зеркало из https://github.com/mozilla/gecko-dev.git
Initialize the output buffer length in order to avoid infinite loop, bug 34859, r=ftang, a=leaf.
This commit is contained in:
Родитель
6fdba025f1
Коммит
52b25adc68
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче