[Pcsclite-cvs-commit] r5886 - /trunk/PCSC/src/hotplug_linux.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Tue Aug 9 07:55:09 UTC 2011


Author: rousseau
Date: Tue Aug  9 07:55:09 2011
New Revision: 5886

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5886
Log:
HPEstablishUSBNotifications(): use atoi() instead of the unsafe sscanf()

Modified:
    trunk/PCSC/src/hotplug_linux.c

Modified: trunk/PCSC/src/hotplug_linux.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_linux.c?rev=5886&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_linux.c (original)
+++ trunk/PCSC/src/hotplug_linux.c Tue Aug  9 07:55:09 2011
@@ -283,7 +283,7 @@
 					   multiple readers */
 					snprintf(filename, sizeof filename, "%s/%s",
 						dirpath, entryB->d_name);
-					sscanf(entryB->d_name, "%d", &deviceNumber);
+					deviceNumber = atoi(entryB->d_name);
 
 					fd = open(filename, O_RDONLY);
 					if (fd < 0)




More information about the Pcsclite-cvs-commit mailing list