Only allow custom length for 0x04
instruction
This commit is contained in:
parent
995ba68bdf
commit
e95ded2edf
1 changed files with 4 additions and 3 deletions
|
@ -65,13 +65,14 @@ public class MyApplet extends Applet {
|
|||
|
||||
if (instruction == 0x00) {
|
||||
response = AuthorName;
|
||||
length = (short)response.length;
|
||||
} else {
|
||||
response = storage;
|
||||
}
|
||||
|
||||
if (length > response.length) {
|
||||
length = (short) response.length;
|
||||
}
|
||||
}
|
||||
|
||||
apdu.setOutgoingLength(length);
|
||||
apdu.sendBytesLong(response, (short) 0, length);
|
||||
|
|
Loading…
Reference in a new issue