Fix NPE in CardCapabilities #2000

This commit is contained in:
Arnaud Fontaine 2017-02-17 13:34:03 +01:00
parent 626cd2a40a
commit 612c0719c0

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");
}