Ticket #253: apdu.patch.2.txt
| File apdu.patch.2.txt, 433 bytes (added by dengert, 20 months ago) |
|---|
| Line | |
|---|---|
| 1 | Index: src/libopensc/apdu.c |
| 2 | =================================================================== |
| 3 | --- src/libopensc/apdu.c (revision 4778) |
| 4 | +++ src/libopensc/apdu.c (working copy) |
| 5 | @@ -490,7 +490,8 @@ |
| 6 | SC_FUNC_RETURN(ctx, SC_LOG_DEBUG_VERBOSE, r); |
| 7 | |
| 8 | if (buflen < le) |
| 9 | - return SC_ERROR_WRONG_LENGTH; |
| 10 | + /* copy as much as will fit in requested buffer */ |
| 11 | + le = buflen; |
| 12 | |
| 13 | memcpy(buf, tbuf, le); |
| 14 | buf += le; |
