Initialize the output buffer length in order to avoid infinite loop, bug 34859, r=ftang, a=leaf.
git-svn-id: svn://10.0.0.236/trunk@65515 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -313,6 +313,7 @@ PRBool nsMsgI18N7bit_data_part(const char *charset, const char *inString, const
|
||||
// convert to unicode
|
||||
while (consumedLen < size) {
|
||||
srcLen = ((size - consumedLen) >= 512) ? 512 : (size - consumedLen); // buffer len or remaining src len
|
||||
unicharLength = 512;
|
||||
res = decoder->Convert(currentSrcPtr, &srcLen, unicharBuff, &unicharLength);
|
||||
if (NS_FAILED(res))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user