[Pcsclite-cvs-commit] r5887 - /trunk/PCSC/src/hotplug_libudev.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Tue Aug 9 07:56:21 UTC 2011
Author: rousseau
Date: Tue Aug 9 07:56:20 2011
New Revision: 5887
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5887
Log:
HPReadBundleValues(): use strtol() instead of the unsafe sscanf()
Modified:
trunk/PCSC/src/hotplug_libudev.c
Modified: trunk/PCSC/src/hotplug_libudev.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libudev.c?rev=5887&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libudev.c (original)
+++ trunk/PCSC/src/hotplug_libudev.c Tue Aug 9 07:56:20 2011
@@ -246,7 +246,7 @@
Log1(PCSC_LOG_ERROR, "udev_device_get_sysattr_value() failed");
return NULL;
}
- sscanf(str, "%X", &idVendor);
+ idVendor = strtol(str, NULL, 16);
str = udev_device_get_sysattr_value(dev, "idProduct");
if (!str)
@@ -254,7 +254,7 @@
Log1(PCSC_LOG_ERROR, "udev_device_get_sysattr_value() failed");
return NULL;
}
- sscanf(str, "%X", &idProduct);
+ idProduct = strtol(str, NULL, 16);
Log4(PCSC_LOG_DEBUG,
"Looking for a driver for VID: 0x%04X, PID: 0x%04X, path: %s",
More information about the Pcsclite-cvs-commit
mailing list