Skip to content

Commit

Permalink
AZDecoder: fix segfault (fuzz)
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel committed Dec 5, 2023
1 parent 976b2ad commit c2d0db7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/aztec/AZDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ DecoderResult Decode(const BitArray& bits)

// As converting character set ECIs ourselves and ignoring/skipping non-character ECIs, not using
// modifiers that indicate ECI protocol (ISO/IEC 24778:2008 Annex F Table F.1)
if (res.bytes[0] == 29) {
if (res.bytes.size() > 1 && res.bytes[0] == 29) {
res.symbology.modifier = '1'; // GS1
res.symbology.aiFlag = AIFlag::GS1;
res.erase(0, 1); // Remove FNC1
Expand Down

0 comments on commit c2d0db7

Please sign in to comment.