mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-01-17 09:28:05 +00:00
Fix sending binary when ne=0
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
433e509c94
commit
08e7d74a81
1 changed files with 4 additions and 4 deletions
|
|
@ -88,10 +88,10 @@ int cmd_read_binary() {
|
|||
return SW_WARNING_EOF();
|
||||
}
|
||||
|
||||
uint16_t maxle = data_len - offset;
|
||||
if (apdu.ne > maxle) {
|
||||
apdu.ne = maxle;
|
||||
}
|
||||
//uint16_t maxle = data_len - offset;
|
||||
//if (apdu.ne > maxle) {
|
||||
// apdu.ne = maxle;
|
||||
//}
|
||||
memcpy(res_APDU, file_get_data(ef) + offset, data_len - offset);
|
||||
res_APDU_size = data_len - offset;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue