From 75d26706c2ae2f96451eb13dae370d9c434242fd Mon Sep 17 00:00:00 2001 From: srowen Date: Mon, 26 Mar 2012 10:50:16 +0000 Subject: [PATCH] Issue 1225 fix another AIOOBE for bad QR code git-svn-id: https://zxing.googlecode.com/svn/trunk@2235 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../google/zxing/qrcode/decoder/DecodedBitStreamParser.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java b/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java index c003e45ee..c7d747aa9 100644 --- a/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java +++ b/core/src/com/google/zxing/qrcode/decoder/DecodedBitStreamParser.java @@ -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