Merge pull request #2063 from af-anssi/fix-npe-in-cardcapabilities

Fix NPE in CardCapabilities #2000
This commit is contained in:
Dominik Schürmann
2017-02-17 14:11:58 +01:00
committed by GitHub

View File

@@ -28,7 +28,7 @@ public class CardCapabilities {
private byte[] mCapabilityBytes;
public CardCapabilities(byte[] historicalBytes) throws UsbTransportException {
if (historicalBytes[0] != 0x00) {
if ((historicalBytes == null) || (historicalBytes[0] != 0x00)) {
throw new UsbTransportException("Invalid historical bytes category indicator byte");
}