[Pcsclite-cvs-commit] r5539 - /trunk/PCSC/src/winscard_svc.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Jan 20 09:35:39 UTC 2011


Author: rousseau
Date: Thu Jan 20 09:35:38 2011
New Revision: 5539

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5539
Log:
contextsListhContext_seeker(): avoid a potential crash if NULL values are used

src/winscard_svc.c:90:22: warning: Dereference of null pointer
        if (currentContext->hContext == *(int32_t *)key)
                            ^
src/winscard_svc.c:90:34: warning: Dereference of null pointer
        if (currentContext->hContext == *(int32_t *)key)
                                        ^

Modified:
    trunk/PCSC/src/winscard_svc.c

Modified: trunk/PCSC/src/winscard_svc.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_svc.c?rev=5539&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_svc.c (original)
+++ trunk/PCSC/src/winscard_svc.c Thu Jan 20 09:35:38 2011
@@ -85,6 +85,7 @@
 	{
 		Log3(PCSC_LOG_CRITICAL, "called with NULL pointer: el=%X, key=%X",
 			el, key);
+		return 0;
 	}
 
 	if (currentContext->hContext == *(int32_t *)key)




More information about the Pcsclite-cvs-commit mailing list