[Pcsclite-cvs-commit] r5537 - /trunk/PCSC/src/winscard_clnt.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Jan 20 09:32:29 UTC 2011
Author: rousseau
Date: Thu Jan 20 09:32:28 2011
New Revision: 5537
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5537
Log:
Avoid a potential crash if NULL values are used
src/winscard_clnt.c:226:27: warning: Dereference of null pointer
if (channelMap->hCard == *(SCARDHANDLE *)key)
^
src/winscard_clnt.c:226:18: warning: Dereference of null pointer
if (channelMap->hCard == *(SCARDHANDLE *)key)
^
src/winscard_clnt.c:260:18: warning: Dereference of null pointer
if (contextMap->hContext == *(SCARDCONTEXT *) key)
^
src/winscard_clnt.c:260:30: warning: Dereference of null pointer
if (contextMap->hContext == *(SCARDCONTEXT *) key)
^
Modified:
trunk/PCSC/src/winscard_clnt.c
Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=5537&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Thu Jan 20 09:32:28 2011
@@ -221,6 +221,7 @@
Log3(PCSC_LOG_CRITICAL,
"CHANNEL_MAP_seeker called with NULL pointer: el=%X, key=%X",
el, key);
+ return 0;
}
if (channelMap->hCard == *(SCARDHANDLE *)key)
@@ -255,6 +256,7 @@
Log3(PCSC_LOG_CRITICAL,
"SCONTEXTMAP_seeker called with NULL pointer: el=%X, key=%X",
el, key);
+ return 0;
}
if (contextMap->hContext == *(SCARDCONTEXT *) key)
More information about the Pcsclite-cvs-commit
mailing list