From 5c92fc6b96db90a1a9a11be63709379306783c3a Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 17 May 2026 09:28:47 -0700 Subject: [PATCH] memory: guard indirect autoconfig RAM allocation mapped_malloc() uses labels starting with "*" for indirect allocations. Those allocations require a fixed start address. Only enter that path when the caller opted in with canbang. This keeps ordinary mappings from following that path because of label text alone. --- memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memory.cpp b/memory.cpp index 6d3d038f..bb4b61ec 100644 --- a/memory.cpp +++ b/memory.cpp @@ -2332,7 +2332,7 @@ bool mapped_malloc (addrbank *ab) ab->baseaddr_direct_w = NULL; ab->flags &= ~ABFLAG_MAPPED; - if (ab->label && ab->label[0] == '*') { + if (canbang && ab->label && ab->label[0] == '*') { if (ab->start == 0 || ab->start == 0xffffffff) { write_log(_T("mapped_malloc(*) without start address!\n")); return false; -- 2.47.3