Fix #253 - Allow caller to read a partial object
by returning all that was read. Related to #257 which fixed a different path in apdu.c git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4804 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
364ba4882d
commit
6b4cb93c84
|
@ -490,7 +490,8 @@ static int do_single_transmit(sc_card_t *card, sc_apdu_t *apdu)
|
||||||
SC_FUNC_RETURN(ctx, SC_LOG_DEBUG_VERBOSE, r);
|
SC_FUNC_RETURN(ctx, SC_LOG_DEBUG_VERBOSE, r);
|
||||||
|
|
||||||
if (buflen < le)
|
if (buflen < le)
|
||||||
return SC_ERROR_WRONG_LENGTH;
|
/* copy as much as will fit in requested buffer */
|
||||||
|
le = buflen;
|
||||||
|
|
||||||
memcpy(buf, tbuf, le);
|
memcpy(buf, tbuf, le);
|
||||||
buf += le;
|
buf += le;
|
||||||
|
|
Loading…
Reference in New Issue