Check input for the null pointer and empty string, bug 17287, r=ducarroz,jefft.
git-svn-id: svn://10.0.0.236/trunk@52109 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
ce3c186894
commit
b6d38ed4f7
@ -96,6 +96,10 @@ nsSaveAsCharset::Convert(const PRUnichar *inString, char **_retval)
|
||||
{
|
||||
if (nsnull == _retval)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
if (nsnull == inString)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
if (0 == *inString)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
nsresult rv;
|
||||
|
||||
if (NULL == mEncoder) return NS_ERROR_FAILURE; // need to call Init() before Convert()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user