mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Possible fix for https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50388
This commit is contained in:
parent
45df470227
commit
7fe6d3c108
|
@ -257,8 +257,10 @@ final class DecodedBitStreamParser {
|
|||
// do not include terminator
|
||||
optionalFieldsLength--;
|
||||
}
|
||||
resultMetadata.setOptionalData(
|
||||
Arrays.copyOfRange(codewords, optionalFieldsStart, optionalFieldsStart + optionalFieldsLength));
|
||||
if (optionalFieldsLength > 0) {
|
||||
resultMetadata.setOptionalData(Arrays.copyOfRange(codewords,
|
||||
optionalFieldsStart, optionalFieldsStart + optionalFieldsLength));
|
||||
}
|
||||
}
|
||||
|
||||
return codeIndex;
|
||||
|
|
Loading…
Reference in a new issue