mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-15 08:39:43 +00:00
In GcmParser::parse(), the authentication check loop used an uninitialized loop counter: `for(uint8_t i; i < 16; i++)`. This is undefined behavior in C++ because `i` has an indeterminate value, potentially causing the authentication check to be skipped entirely or to read out-of-bounds memory. Fix: initialize `i` to 0 so the loop correctly iterates all 16 bytes of the authentication key. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>