mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Check input for the null pointer and empty string, bug 17287, r=ducarroz,jefft.
This commit is contained in:
parent
f93347967c
commit
042fc6540b
@ -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…
Reference in New Issue
Block a user