Fix sending binary when ne=0
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user