Fix an off-by-one error with undefined codepoints. Bug 564679, r=Masatoshi Kimura <VYV03354@nifty.ne.jp>

This commit is contained in:
Simon Montagu
2010-05-11 17:38:25 +03:00
parent 054e7dc7dd
commit 11a662066c

View File

@@ -236,11 +236,12 @@ nsresult nsUnicodeDecodeHelper::ConvertByFastTable(
}
for (; src<srcEnd;) {
*dest = aFastTable[*src++];
*dest = aFastTable[*src];
if (*dest == 0xfffd && aErrorSignal) {
res = NS_ERROR_ILLEGAL_INPUT;
break;
}
src++;
dest++;
}