[Pcsclite-cvs-commit] r5981 - /trunk/PCSC/src/spy/pcsc-spy.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Sep 27 12:53:38 UTC 2011
Author: rousseau
Date: Tue Sep 27 12:53:38 2011
New Revision: 5981
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5981
Log:
SCardGetAttrib(): manage SCARD_AUTOALLOCATE case
Modified:
trunk/PCSC/src/spy/pcsc-spy.c
Modified: trunk/PCSC/src/spy/pcsc-spy.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.c?rev=5981&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.c (original)
+++ trunk/PCSC/src/spy/pcsc-spy.c Tue Sep 27 12:53:38 2011
@@ -603,6 +603,10 @@
PCSC_API p_SCardGetAttrib(SCardGetAttrib)
{
LONG rv;
+ int autoallocate = 0;
+
+ if (pcbAttrLen)
+ autoallocate = *pcbAttrLen == SCARD_AUTOALLOCATE;
Enter();
spy_long(hCard);
@@ -611,7 +615,14 @@
if (NULL == pcbAttrLen)
spy_buffer(NULL, 0);
else
- spy_buffer(pbAttr, *pcbAttrLen);
+ {
+ const unsigned char *s = pbAttr;
+
+ if (autoallocate)
+ s = *(char **)pbAttr;
+
+ spy_buffer(s, *pcbAttrLen);
+ }
Quit();
return rv;
}
More information about the Pcsclite-cvs-commit
mailing list