cppcheck nullPointerOutOfMemory

This commit is contained in:
Philippe Teuwen committed 2025-03-24 23:46:43 +01:00
1 parent e42932738e
commit ad84875afd
44 files changed
+314 -5

No files matched your search

+4
View File
@@ -901,6 +901,10 @@ static int CmdLegicDump(const char *Cmd) {
PrintAndLogEx(SUCCESS, "Reading tag memory." NOLF);
legic_packet_t *payload = calloc(1, sizeof(legic_packet_t));
if (payload == NULL) {
PrintAndLogEx(WARNING, "Cannot allocate memory");
return PM3_EMALLOC;
}
payload->offset = 0;
payload->iv = 0x55;
payload->len = dumplen;