diff --git a/CHANGELOG.md b/CHANGELOG.md index ecd958c9d..b75d3c732 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ All notable changes to this project will be documented in this file. This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log... ## [unreleased][unreleased] +- Fixed client build with `-march=x86-64-v3` (CentOS/RHEL 10 default) - false `-Wstringop-overflow` in the EMV AID list table (@r3wretrhy) - Changed `hf seos info` - now prints UID, ATQA, SAK, ATS, MIFARE Classic emulation, which SEOS AIDs answer and the known AIDs found (@antoniovazquezblanco) - Fixed `hf seos managekeys -p` - key table columns stay aligned for slots 10 and up (@antoniovazquezblanco) - Fixed `aidlist.json` - uppercased the SEOS, TeslaDAP and LA Tap AIDs (@antoniovazquezblanco) diff --git a/client/src/emv/emvcore.c b/client/src/emv/emvcore.c index 24671a068..ace7356ae 100644 --- a/client/src/emv/emvcore.c +++ b/client/src/emv/emvcore.c @@ -207,9 +207,14 @@ static void aidlist_rule(char *dst, size_t dstlen, size_t w_aid, size_t w_prio, dst[pos++] = '+'; for (size_t c = 0; c < 3; c++) { - for (size_t i = 0; (i < widths[c] + 2) && (pos + 2 < dstlen); i++) { - dst[pos++] = '-'; + // memset, not a byte loop: gcc's AVX2 vectorized loop trips -Wstringop-overflow + size_t n = widths[c] + 2; + size_t room = (pos + 2 < dstlen) ? dstlen - pos - 2 : 0; + if (n > room) { + n = room; } + memset(dst + pos, '-', n); + pos += n; if (pos + 1 < dstlen) { dst[pos++] = '+'; }