diff --git a/src/hsm/sc_hsm.c b/src/hsm/sc_hsm.c index 764d4df..fcd1929 100644 --- a/src/hsm/sc_hsm.c +++ b/src/hsm/sc_hsm.c @@ -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; } }