Issue 1225 fix another AIOOBE for bad QR code

git-svn-id: https://zxing.googlecode.com/svn/trunk@2235 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2012-03-26 10:50:16 +00:00
parent 1b2cd0f442
commit 75d26706c2

View file

@ -258,6 +258,9 @@ final class DecodedBitStreamParser {
}
if (count == 1) {
// special case: one character left
if (bits.available() < 6) {
throw FormatException.getFormatInstance();
}
result.append(toAlphaNumericChar(bits.readBits(6)));
}
// See section 6.4.8.1, 6.4.8.2