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:
nhotta%netscape.com
2000-04-07 23:58:59 +00:00
parent 882b02a93c
commit c1cd9d0105

View File

@@ -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;