From c2d0db780e2b63d5b32c465f9d4c9fc168aba37a Mon Sep 17 00:00:00 2001 From: axxel Date: Tue, 5 Dec 2023 01:09:55 +0100 Subject: [PATCH] AZDecoder: fix segfault (fuzz) --- core/src/aztec/AZDecoder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/aztec/AZDecoder.cpp b/core/src/aztec/AZDecoder.cpp index 788f49cd1b..7ab6f6a84f 100644 --- a/core/src/aztec/AZDecoder.cpp +++ b/core/src/aztec/AZDecoder.cpp @@ -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