[Pcsclite-cvs-commit] r5673 - /trunk/PCSC/src/hotplug_libudev.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sat Mar 26 17:21:54 UTC 2011
Author: rousseau
Date: Sat Mar 26 17:21:48 2011
New Revision: 5673
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5673
Log:
Check the udev_device_get_devnode() return value (and avoids a crash)
Fix Debian bug #619241
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=5673&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libudev.c (original)
+++ trunk/PCSC/src/hotplug_libudev.c Sat Mar 26 17:21:48 2011
@@ -426,6 +426,10 @@
continue;
devpath = udev_device_get_devnode(parent);
+ if (!devpath)
+ /* the device disapeared? */
+ continue;
+
driver = get_driver(parent, devpath);
if (NULL == driver)
/* no driver known for this device */
@@ -547,6 +551,9 @@
parent = udev_device_get_parent_with_subsystem_devtype(dev, "usb",
"usb_device");
devpath = udev_device_get_devnode(parent);
+ if (!devpath)
+ /* the device disapeared? */
+ continue;
HPAddDevice(dev, parent, devpath);
More information about the Pcsclite-cvs-commit
mailing list