void issues with ssize_t See r5135 and r5195
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5207 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
4f266b6099
commit
6ef7366074
@ -807,7 +807,6 @@ static int piv_read_obj_from_file(sc_card_t * card, char * filename,
|
||||
int r;
|
||||
int f = -1;
|
||||
size_t len;
|
||||
int res;
|
||||
u8 tagbuf[16];
|
||||
size_t rbuflen;
|
||||
const u8 * body;
|
||||
@ -825,13 +824,12 @@ static int piv_read_obj_from_file(sc_card_t * card, char * filename,
|
||||
r = SC_ERROR_FILE_NOT_FOUND;
|
||||
goto err;
|
||||
}
|
||||
res = read(f, tagbuf, sizeof(tagbuf)); /* get tag and length */
|
||||
if (res < 0) {
|
||||
len = read(f, tagbuf, sizeof(tagbuf)); /* get tag and length */
|
||||
if (len < 2 || len > sizeof(tagbuf)) {
|
||||
sc_debug(card->ctx, SC_LOG_DEBUG_NORMAL,"Problem with \"%s\"\n",filename);
|
||||
r = SC_ERROR_DATA_OBJECT_NOT_FOUND;
|
||||
goto err;
|
||||
}
|
||||
len = res;
|
||||
body = tagbuf;
|
||||
if (sc_asn1_read_tag(&body, 0xfffff, &cla_out,
|
||||
&tag_out, &bodylen) != SC_SUCCESS) {
|
||||
|
Loading…
Reference in New Issue
Block a user