diff --git a/mozilla/mailnews/news/tests/nntpTest.cpp b/mozilla/mailnews/news/tests/nntpTest.cpp index 93a10506c84..c350773506d 100644 --- a/mozilla/mailnews/news/tests/nntpTest.cpp +++ b/mozilla/mailnews/news/tests/nntpTest.cpp @@ -342,7 +342,8 @@ nsresult nsNntpTestDriver::PromptForUserDataAndBuildUrl(const char * userPrompt) // only replace m_userData if the user actually entered a valid line... // this allows the command function to set a default value on m_userData before // calling this routine.... - PL_strcpy(m_userData, tempBuffer); + if (tempBuffer && *tempBuffer) + PL_strcpy(m_userData, tempBuffer); return NS_OK; }