res_APDU SHALL NOT BE moved, only memcpied or memmoved.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-05-27 00:58:35 +02:00
parent 8554262aaf
commit 1ac4402f99

View File

@@ -461,7 +461,8 @@ static int cmd_read_binary()
if (apdu.ne > maxle)
apdu.ne = maxle;
if (offset) {
res_APDU += offset;
memmove(res_APDU, res_APDU+offset, res_APDU_size-offset);
//res_APDU += offset;
res_APDU_size -= offset;
}
}