mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 786687 - Add null check for passed parameter to NS_strlen r=dougt
This commit is contained in:
parent
e50615ae01
commit
1a6d9aa263
@ -45,7 +45,7 @@ NS_IMETHODIMP nsTextToSubURI::ConvertAndEscape(
|
||||
{
|
||||
char buf[256];
|
||||
char *pBuf = buf;
|
||||
int32_t ulen = NS_strlen(text);
|
||||
int32_t ulen = text ? NS_strlen(text) : 0;
|
||||
int32_t outlen = 0;
|
||||
if(NS_SUCCEEDED(rv = encoder->GetMaxLength(text, ulen, &outlen)))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user