Return wrong data for invalid reset-code length

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2026-08-14 14:26:42 +02:00
parent de54acefb2
commit 35c4f19478
+2 -2
View File
@@ -98,8 +98,8 @@ int cmd_put_data(void) {
r = file_put_data(ef, CONST_BYTE_ARRAY(pw_status, sizeof(pw_status)));
}
else if (fid == EF_RC) {
if ((r = check_pin_len(EF_RC, apdu.nc)) != 0x9000) {
return r;
if (check_pin_len(EF_RC, apdu.nc) != 0x9000) {
return SW_WRONG_DATA();
}
has_rc = false;
if ((r = load_dek()) != PICOKEYS_OK) {