From d5ecc626ab10bbca29cb44c7b89cd470e3e9645e Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 23 Mar 2025 23:58:43 +0100 Subject: [PATCH] cppcheck ctunullpointerOutOfMemory --- client/src/cmdlffdxb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/cmdlffdxb.c b/client/src/cmdlffdxb.c index a2e0e10a1..b0063a129 100644 --- a/client/src/cmdlffdxb.c +++ b/client/src/cmdlffdxb.c @@ -58,6 +58,9 @@ static int CmdHelp(const char *Cmd); static int getFDXBBits(uint64_t national_code, uint16_t country_code, uint8_t is_animal, uint8_t is_extended, uint32_t extended, uint8_t *bits) { + if (bits == NULL) { + return PM3_ESOFT; + } // add preamble ten 0x00 and one 0x01 memset(bits, 0x00, 10); bits[10] = 1;