mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-09-24 09:06:30 +00:00
GCC on aarch64 vectorizes the sector fill loop in parse_sector_ranges() into 16-byte NEON stores. When it versions the loop it loses the range relationship between count and max_sectors, and reports a 16-byte store into the last 8 bytes of sectors[40]. The code was correct; the guard was there. Does not reproduce on x86-64 gcc 14. Accumulate sectors in a uint64_t bitmask instead of an array, so there is no store for -Wstringop-overflow to mis-size on any target. Sector numbers are already validated to 1..39, so the bound check is no longer needed. Supersedes the sectors[48] padding, which only absorbs a 16-byte vector and would regress on wider ones. Side effect: duplicate sectors within a single --aid argument now dedupe instead of erroring (E103:1-3,2 encodes 1-3). Conflicts between different --aid arguments still error.