cmac can be NULL

This commit is contained in:
merlokk
2021-07-07 18:06:38 +03:00
parent c99002c5e0
commit ca983f1473

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);
}