libopensc: initialize value returned by sc_select_file
several places in the code expect sc_select_file to set *file_out to NULL in case of failure. Adjust the function to behave like this. Fixes #460
This commit is contained in:
parent
6a6ef61d1a
commit
a09ca246a7
|
@ -475,6 +475,9 @@ iso7816_select_file(struct sc_card *card, const struct sc_path *in_path, struct
|
|||
pathlen = in_path->len;
|
||||
pathtype = in_path->type;
|
||||
|
||||
if (file_out != NULL) {
|
||||
*file_out = NULL;
|
||||
}
|
||||
if (in_path->aid.len) {
|
||||
if (!pathlen) {
|
||||
memcpy(path, in_path->aid.value, in_path->aid.len);
|
||||
|
|
Loading…
Reference in New Issue