From 70e39ec0c450b1cb81ed03341b4e055dc7d030c6 Mon Sep 17 00:00:00 2001 From: merlokk <807634+merlokk@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:52:54 +0200 Subject: [PATCH] check return code --- client/src/mifare/gen4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/src/mifare/gen4.c b/client/src/mifare/gen4.c index 5846c2a40..b01085671 100644 --- a/client/src/mifare/gen4.c +++ b/client/src/mifare/gen4.c @@ -154,6 +154,9 @@ int mfG4ChangePassword(uint8_t *pwd, uint8_t *newpwd, bool verbose) { return res; } + if (resplen != 2 || resp[0] != 0x90 || resp[1] != 0x00) + return PM3_EAPDU_FAIL; + return PM3_SUCCESS; }