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:
dengert 2010-10-08 14:53:29 +00:00
parent 364ba4882d
commit 6b4cb93c84
1 changed files with 2 additions and 1 deletions

View File

@ -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);
if (buflen < le)
return SC_ERROR_WRONG_LENGTH;
/* copy as much as will fit in requested buffer */
le = buflen;
memcpy(buf, tbuf, le);
buf += le;