- 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:
okir 2003-01-20 10:22:41 +00:00
parent 501cdbd7e0
commit c5f5557367
1 changed files with 2 additions and 0 deletions

View File

@ -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;