avoid integer underflow
This commit is contained in:
parent
a332f72b38
commit
9c025280a6
|
@ -190,7 +190,7 @@ static int sc_hsm_select_file_ex(sc_card_t *card,
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((in_path->value[0] == 0x3F) && (in_path->value[1] == 0x00)) {
|
if ((in_path->len >= 2) && (in_path->value[0] == 0x3F) && (in_path->value[1] == 0x00)) {
|
||||||
// The SmartCard-HSM is an applet that is not default selected. Simulate selection of the MF
|
// The SmartCard-HSM is an applet that is not default selected. Simulate selection of the MF
|
||||||
if (in_path->len == 2) {
|
if (in_path->len == 2) {
|
||||||
file = sc_file_new();
|
file = sc_file_new();
|
||||||
|
|
Loading…
Reference in New Issue