mirror of
https://github.com/zxing/zxing.git
synced 2024-11-10 04:54:04 -08:00
Issue 1324 Generate proper FormatException on QR code with bad structured append segment
git-svn-id: https://zxing.googlecode.com/svn/trunk@2367 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2696e58e07
commit
d52fd6879e
|
@ -80,6 +80,9 @@ final class DecodedBitStreamParser {
|
|||
// We do little with FNC1 except alter the parsed result a bit according to the spec
|
||||
fc1InEffect = true;
|
||||
} else if (mode == Mode.STRUCTURED_APPEND) {
|
||||
if (bits.available() < 16) {
|
||||
throw FormatException.getFormatInstance();
|
||||
}
|
||||
// not really supported; all we do is ignore it
|
||||
// Read next 8 bits (symbol sequence #) and 8 bits (parity data), then continue
|
||||
bits.readBits(16);
|
||||
|
|
Loading…
Reference in a new issue