Report incorrect body length for 0x02 instruction

This commit is contained in:
Manuel Thalmann 2023-10-13 01:35:20 +02:00
parent e95ded2edf
commit 89d1ff4acf

View file

@ -81,7 +81,7 @@ public class MyApplet extends Applet {
length = apdu.setIncomingAndReceive();
if (length > 20) {
// ToDo: Handle too much data.
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
} else {
Util.arrayCopy(buffer, ISO7816.OFFSET_CDATA, storage, (short) 0, length);
}