Report incorrect body length for 0x02
instruction
This commit is contained in:
parent
e95ded2edf
commit
89d1ff4acf
|
@ -81,7 +81,7 @@ public class MyApplet extends Applet {
|
||||||
length = apdu.setIncomingAndReceive();
|
length = apdu.setIncomingAndReceive();
|
||||||
|
|
||||||
if (length > 20) {
|
if (length > 20) {
|
||||||
// ToDo: Handle too much data.
|
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
|
||||||
} else {
|
} else {
|
||||||
Util.arrayCopy(buffer, ISO7816.OFFSET_CDATA, storage, (short) 0, length);
|
Util.arrayCopy(buffer, ISO7816.OFFSET_CDATA, storage, (short) 0, length);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue