diff options
author | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-01-02 16:50:49 +0000 |
---|---|---|
committer | laforge <laforge@e0336214-984f-0b4b-a45f-81c69e1f0ede> | 2006-01-02 16:50:49 +0000 |
commit | a8cb02c0c1d152153beb8706c6e8737d8cbc3a2e (patch) | |
tree | e86b83fd66b9d07bbd2fa29e284aaf47a2c553c6 /ccid | |
parent | ea662563d40da474aeffde65ba847c8756510dea (diff) |
fix CCID PC_to_RDR_escape (Werner Koch)
git-svn-id: https://svn.gnumonks.org/trunk/librfid@1740 e0336214-984f-0b4b-a45f-81c69e1f0ede
Diffstat (limited to 'ccid')
-rw-r--r-- | ccid/ccid-driver.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/ccid/ccid-driver.c b/ccid/ccid-driver.c index 7b024b4..edca5ca 100644 --- a/ccid/ccid-driver.c +++ b/ccid/ccid-driver.c @@ -196,6 +196,7 @@ enum { enum { VENDOR_SCM = 0x04e6, VENDOR_CHERRY = 0x046a, + VENDOR_OMNIKEY= 0x076b, VENDOR_GEMPC = 0x08e6 }; @@ -1302,12 +1303,12 @@ send_escape_cmd (ccid_driver_t handle, case CCID_DRIVER_ERR_CARD_INACTIVE: case CCID_DRIVER_ERR_NO_CARD: { - if (msglen > resultmax) - rc = CCID_DRIVER_ERR_INV_VALUE; /* Response too large. */ + if (msglen < 10 || (msglen-10) > resultmax ) + rc = CCID_DRIVER_ERR_INV_VALUE; /* Invalid length of response. */ else { - memcpy (result, msg, msglen); - *resultlen = msglen; + memcpy (result, msg+10, msglen-10); + *resultlen = msglen-10; } rc = 0; } |