From bd242f6e41a836577ed351a6e562d2a0fd9884c8 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 24 Mar 2025 11:33:08 +0100 Subject: [PATCH] cppcheck ctunullpointerOutOfMemory --- common/lfdemod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/lfdemod.c b/common/lfdemod.c index 6a4dbdf73..21ef5469a 100644 --- a/common/lfdemod.c +++ b/common/lfdemod.c @@ -2075,6 +2075,7 @@ size_t fskdemod(uint8_t *dest, size_t size, uint8_t rfLen, uint8_t invert, uint8 // only transition waves are 1s // TODO: Iceman - hard coded value 7, should be #define void psk1TOpsk2(uint8_t *bits, size_t size) { + if (bits == NULL) return; uint8_t lastbit = bits[0]; for (size_t i = 1; i < size; i++) { //ignore errors