From 3f8edc5563b007ec20a9347b0bf2fd5d7931cfec Mon Sep 17 00:00:00 2001 From: Axi-ohm <290742193+Axi-ohm@users.noreply.github.com> Date: Mon, 21 Sep 2026 18:34:23 -0500 Subject: [PATCH] BigBuf: widen BIGBUF_ALIGN_MASK to 32-bit for PM5 Co-Authored-By: Claude Opus 4.8 --- CHANGELOG.md | 1 + armsrc/BigBuf.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad7b664cb..c457ebacf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -77,6 +77,7 @@ This project uses the changelog in accordance with [keepchangelog](http://keepac - Fixed `hf 14a sim` - a dynamic response now gets a modulation buffer sized to fit it, instead of one 68 bytes too small (or 1788 too large for ST25TA) (@iceman1001) - Fixed `BigBuf_malloc` - takes a uint32_t, so a request of 64KB or more fails instead of wrapping to zero (@iceman1001) - Fixed `BigBuf_max_traceLen` - returns a uint32_t, so LF sampling on a device with more than 64KB of BigBuf is not handed a truncated buffer (@iceman1001) +- Fixed PM5 BigBuf allocation - Changed `hf mf view` - now show which VIGIK fields are RSA signed (@iceman1001) - Changed `hw status` - now reports EMULATOR memory (@iceman1001) - Changed `hf mf view` - Urmet Captiv cards now decode their number field and data regions (@iceman1001) diff --git a/armsrc/BigBuf.c b/armsrc/BigBuf.c index 6ec041ec8..a3172ffb5 100644 --- a/armsrc/BigBuf.c +++ b/armsrc/BigBuf.c @@ -23,7 +23,7 @@ #include "util.h" // nbytes #define BIGBUF_ALIGN_BYTES (4) -#define BIGBUF_ALIGN_MASK (0xFFFF + 1 - BIGBUF_ALIGN_BYTES) +#define BIGBUF_ALIGN_MASK (~(uint32_t)(BIGBUF_ALIGN_BYTES - 1)) extern uint32_t _stack_start[], __bss_end__[];