Fixed buffer overflow when unlocking the device.

Fixes #68.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-12-03 08:36:05 +01:00
parent 866aac8fe3
commit f88aad1e2c

View File

@@ -197,7 +197,7 @@ int cmd_extras() {
low_flash_available();
}
else if (P2(apdu) == SECURE_LOCK_MASK) {
memcpy(mkek_mask, apdu.data, apdu.nc);
memcpy(mkek_mask, apdu.data, MKEK_KEY_SIZE);
has_mkek_mask = true;
}
}