final batch of adding NULL checks

This commit is contained in:
iceman1001 committed 2026-09-15 08:36:13 +02:00
1 parent 0cfe0e0e8d
commit e6c1c4e1a7
11 files changed
+66

No files matched your search

+6
View File
@@ -209,6 +209,12 @@ int HfSimulateTkm(const uint8_t *uid, uint8_t modulation, uint32_t timeout) {
LEDsoff();
uint8_t *data = BigBuf_calloc(256);
if (data == NULL) {
DbpString("Failed to allocate memory");
reply_ng(CMD_HF_TEXKOM_SIMULATE, PM3_EMALLOC, NULL, 0);
return PM3_EMALLOC;
}
uint32_t elen = HfEncodeTkm(uid, modulation, data);
if (elen == 0) {
DbpString("encode error");