cmac can be NULL

This commit is contained in:
merlokk committed 2021-07-07 18:06:38 +03:00
1 parent c99002c5e0
commit ca983f1473
1 file changed
+2 -1
+2 -1
View File
@@ -265,6 +265,7 @@ void DesfireCryptoCMAC(DesfireContext *ctx, uint8_t *data, size_t len, uint8_t *
DesfireCryptoEncDec(ctx, true, buffer, len, NULL, true);
memcpy(cmac, ctx->IV, kbs);
if (cmac != NULL)
memcpy(cmac, ctx->IV, kbs);
}