mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
Issue 1688 reject unexpected macro block code instead of getting into a loop
git-svn-id: https://zxing.googlecode.com/svn/trunk@2807 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
c29816a464
commit
279cf84a13
|
@ -114,6 +114,10 @@ final class DecodedBitStreamParser {
|
||||||
case BEGIN_MACRO_PDF417_CONTROL_BLOCK:
|
case BEGIN_MACRO_PDF417_CONTROL_BLOCK:
|
||||||
codeIndex = decodeMacroBlock(codewords, codeIndex, resultMetadata);
|
codeIndex = decodeMacroBlock(codewords, codeIndex, resultMetadata);
|
||||||
break;
|
break;
|
||||||
|
case BEGIN_MACRO_PDF417_OPTIONAL_FIELD:
|
||||||
|
case MACRO_PDF417_TERMINATOR:
|
||||||
|
// Should not see these outside a macro block
|
||||||
|
throw FormatException.getFormatInstance();
|
||||||
default:
|
default:
|
||||||
// Default to text compaction. During testing numerous barcodes
|
// Default to text compaction. During testing numerous barcodes
|
||||||
// appeared to be missing the starting mode. In these cases defaulting
|
// appeared to be missing the starting mode. In these cases defaulting
|
||||||
|
|
Loading…
Reference in a new issue