- sc_pkcs15_read_file: gracefully deal with short reads
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@876 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
501cdbd7e0
commit
c5f5557367
|
@ -1040,6 +1040,8 @@ int sc_pkcs15_read_file(struct sc_pkcs15_card *p15card,
|
|||
free(data);
|
||||
return r;
|
||||
}
|
||||
/* sc_read_binary may return less than requested */
|
||||
len = r;
|
||||
sc_unlock(p15card->card);
|
||||
}
|
||||
*buf = data;
|
||||
|
|
Loading…
Reference in New Issue