Merge pull request #2063 from af-anssi/fix-npe-in-cardcapabilities
Fix NPE in CardCapabilities #2000
This commit is contained in:
@@ -28,7 +28,7 @@ public class CardCapabilities {
|
|||||||
private byte[] mCapabilityBytes;
|
private byte[] mCapabilityBytes;
|
||||||
|
|
||||||
public CardCapabilities(byte[] historicalBytes) throws UsbTransportException {
|
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");
|
throw new UsbTransportException("Invalid historical bytes category indicator byte");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user