[p15dump] Do not attempt to access NULL pointer
This commit is contained in:
parent
462bebd380
commit
e309d0f06f
@ -66,10 +66,11 @@ static int dump_unusedspace(void)
|
||||
|
||||
if (p15card->file_unusedspace != NULL)
|
||||
path = p15card->file_unusedspace->path;
|
||||
else {
|
||||
else if (p15card->file_app != NULL) {
|
||||
path = p15card->file_app->path;
|
||||
sc_append_path_id(&path, (const u8 *) "\x50\x33", 2);
|
||||
}
|
||||
} else
|
||||
return -1;
|
||||
path.count = -1;
|
||||
|
||||
r = sc_pkcs15_read_file(p15card, &path, &buf, &buf_len);
|
||||
|
Loading…
Reference in New Issue
Block a user