fix purify errors - uninitialized memory on poorly formatted CID strings, and FMM on nsString::fputs
r=waterson, scc a=waterson git-svn-id: svn://10.0.0.236/trunk@71822 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -2186,7 +2186,7 @@ NS_COM int fputs(const nsString& aString, FILE* out)
|
||||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete[] cp;
|
||||
Recycle(cp);
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ NS_COM PRBool nsID::Parse(const char *aIDStr)
|
||||
PRInt32 count = 0;
|
||||
PRInt32 n1, n2, n3[8];
|
||||
PRInt32 n0;
|
||||
::memset(n3, 0, sizeof(n3));
|
||||
|
||||
if (NULL != aIDStr) {
|
||||
count = PR_sscanf(aIDStr,
|
||||
|
||||
@@ -2186,7 +2186,7 @@ NS_COM int fputs(const nsString& aString, FILE* out)
|
||||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete[] cp;
|
||||
Recycle(cp);
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
||||
@@ -2186,7 +2186,7 @@ NS_COM int fputs(const nsString& aString, FILE* out)
|
||||
if(len>0)
|
||||
::fwrite(cp, 1, len, out);
|
||||
if (cp != buf) {
|
||||
delete[] cp;
|
||||
Recycle(cp);
|
||||
}
|
||||
return (int) len;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user