mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38086
This commit is contained in:
parent
5b0036446e
commit
aeeec7b07f
|
@ -179,8 +179,9 @@ final class DecodedBitStreamParser {
|
|||
for (int i = 0; i < NUMBER_OF_SEQUENCE_CODEWORDS; i++, codeIndex++) {
|
||||
segmentIndexArray[i] = codewords[codeIndex];
|
||||
}
|
||||
resultMetadata.setSegmentIndex(Integer.parseInt(decodeBase900toBase10(segmentIndexArray,
|
||||
NUMBER_OF_SEQUENCE_CODEWORDS)));
|
||||
String segmentIndexString = decodeBase900toBase10(segmentIndexArray, NUMBER_OF_SEQUENCE_CODEWORDS);
|
||||
int segmentIndex = segmentIndexString.isEmpty() ? 0 : Integer.parseInt(segmentIndexString);
|
||||
resultMetadata.setSegmentIndex(segmentIndex);
|
||||
|
||||
// Decoding the fileId codewords as 0-899 numbers, each 0-filled to width 3. This follows the spec
|
||||
// (See ISO/IEC 15438:2015 Annex H.6) and preserves all info, but some generators (e.g. TEC-IT) write
|
||||
|
|
Loading…
Reference in a new issue