add missing 2 bytes when automatically adding length to NDEF

This commit is contained in:
Michele Balistreri 2019-04-05 19:16:00 +03:00
parent 21e9f66798
commit 29346c0668
No known key found for this signature in database
GPG Key ID: E9567DA33A4F791A

View File

@ -468,6 +468,7 @@ public class KeycardApplet extends Applet {
if (Util.makeShort(apduBuffer[ISO7816.OFFSET_CDATA], apduBuffer[(short)(ISO7816.OFFSET_CDATA + 1)]) != (short)(dataLen - 2)) {
offset = ISO7816.OFFSET_P2;
apduBuffer[ISO7816.OFFSET_P2] = 0;
dataLen += 2;
} else {
offset = ISO7816.OFFSET_CDATA;
}