[Pcsclite-cvs-commit] r2144 - trunk/PCSC/src

Ludovic Rousseau rousseau at costa.debian.org
Thu Aug 31 19:08:48 UTC 2006


Author: rousseau
Date: 2006-08-31 19:08:47 +0000 (Thu, 31 Aug 2006)
New Revision: 2144

Modified:
   trunk/PCSC/src/winscard.c
Log:
SCardStatus(): do not check for negative value of
rContext->readerState->cardAtrLength since it is a DWORD (unsigned)

Thanks to -Wextra for the bug report


Modified: trunk/PCSC/src/winscard.c
===================================================================
--- trunk/PCSC/src/winscard.c	2006-08-31 18:59:10 UTC (rev 2143)
+++ trunk/PCSC/src/winscard.c	2006-08-31 19:08:47 UTC (rev 2144)
@@ -1083,8 +1083,7 @@
 		return rv;
 
 	if (strlen(rContext->lpcReader) > MAX_BUFFER_SIZE
-			|| rContext->readerState->cardAtrLength > MAX_ATR_SIZE
-			|| rContext->readerState->cardAtrLength < 0)
+			|| rContext->readerState->cardAtrLength > MAX_ATR_SIZE)
 		return SCARD_F_INTERNAL_ERROR;
 
 	/*




More information about the Pcsclite-cvs-commit mailing list