From e2f59d215fed5dbba2e68e21e6c14120587a305f Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Mon, 30 Dec 2019 21:29:04 +0100 Subject: [PATCH] cppcheck --- armsrc/mifareutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/armsrc/mifareutil.c b/armsrc/mifareutil.c index 97ac6ee90..cfd8f4b35 100644 --- a/armsrc/mifareutil.c +++ b/armsrc/mifareutil.c @@ -92,7 +92,7 @@ int mifare_sendcmd_short(struct Crypto1State *pcs, uint8_t crypted, uint8_t cmd, AddCrc14A(dcmd, 2); memcpy(ecmd, dcmd, sizeof(dcmd)); - if (crypted) { + if (pcs && crypted) { par[0] = 0; for (pos = 0; pos < 4; pos++) { ecmd[pos] = crypto1_byte(pcs, 0x00, 0) ^ dcmd[pos];