From 9d9c2296fa0956236c2931d4746b4a38ad737638 Mon Sep 17 00:00:00 2001 From: Damian Schneider Date: Mon, 29 Dec 2025 19:23:42 +0100 Subject: [PATCH 1/2] use same approach for ledma as is done in gap file - fixes ledmap containing garbage values --- wled00/FX_fcn.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 3f357daa29..f2acfb05b1 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -2005,6 +2005,10 @@ bool WS2812FX::deserializeMap(unsigned n) { d_free(customMappingTable); customMappingTable = static_cast(d_malloc(sizeof(uint16_t)*getLengthTotal())); // prefer DRAM for speed + // fill with empty in case we don't fill the entire matrix + unsigned matrixSize = Segment::maxWidth * Segment::maxHeight; + for (unsigned i = 0; i Date: Wed, 31 Dec 2025 09:09:22 +0100 Subject: [PATCH 2/2] move array access after nullpointer check --- wled00/FX_fcn.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index f2acfb05b1..799432cc71 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -2005,13 +2005,12 @@ bool WS2812FX::deserializeMap(unsigned n) { d_free(customMappingTable); customMappingTable = static_cast(d_malloc(sizeof(uint16_t)*getLengthTotal())); // prefer DRAM for speed - // fill with empty in case we don't fill the entire matrix - unsigned matrixSize = Segment::maxWidth * Segment::maxHeight; - for (unsigned i = 0; i