From 10e28291236f3de530ad12c06874bbef1ecd3492 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 28 Jan 2021 14:11:33 +0100 Subject: [PATCH] cppchecker fix UID might be NULL --- client/src/cmdhf15.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/cmdhf15.c b/client/src/cmdhf15.c index 3eebbce74..04ffbae45 100644 --- a/client/src/cmdhf15.c +++ b/client/src/cmdhf15.c @@ -459,6 +459,10 @@ static int nxp_15693_print_signature(uint8_t *uid, uint8_t *signature) { // uid[8] tag uid // returns description of the best match static const char *getTagInfo_15(uint8_t *uid) { + if (uid == NULL) { + return ""; + } + uint64_t myuid, mask; int i = 0, best = -1; memcpy(&myuid, uid, sizeof(uint64_t));