From 74c60301d11f7ba5976e8a961acd7359075aefd5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Mon, 24 Mar 2025 10:47:33 +0100 Subject: [PATCH] cppcheck mem alloc: oops forgot to save one file --- client/src/cmdhfjooki.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/cmdhfjooki.c b/client/src/cmdhfjooki.c index bdd1606ac..246b6b6bf 100644 --- a/client/src/cmdhfjooki.c +++ b/client/src/cmdhfjooki.c @@ -491,6 +491,10 @@ static int CmdHF14AJookiSim(const char *Cmd) { // hf mfu sim... uint8_t *data = calloc(144, sizeof(uint8_t)); + if (data == NULL) { + PrintAndLogEx(ERR, "Memory allocation failed"); + return PM3_EMALLOC; + } memcpy(data, uid, 3); memcpy(data + (1 * 4), uid + 3, 4);