mirror of
https://github.com/polhenarejos/pico-openpgp.git
synced 2026-07-13 17:15:42 +01:00
C4 rejects payloads longer than four bytes, preventing retry-counter corruption.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -46,6 +46,9 @@ int cmd_put_data(void) {
|
||||
return SW_SECURITY_STATUS_NOT_SATISFIED();
|
||||
}
|
||||
if (fid == EF_PW_STATUS) {
|
||||
if (apdu.nc > 4) {
|
||||
return SW_WRONG_DATA();
|
||||
}
|
||||
fid = EF_PW_PRIV;
|
||||
if (apdu.nc == 0) {
|
||||
return SW_WRONG_LENGTH();
|
||||
|
||||
Reference in New Issue
Block a user