[PATCH] HAL 0.5 - fix segfault on bad event data

Kay Sievers kay.sievers at vrfy.org
Mon Mar 14 09:57:03 PST 2005


Such events should not happen, but better recover from it. :)

SEQNUM=0 ACTION=add DEVPATH="/devices/pci0000:00/0000:00:1d.7" /usr/libexec/hal.hotplug usb

Program received signal SIGSEGV, Segmentation fault.
0x0804e513 in hal_device_merge_with_rewrite (target=0x81413f8, source=0x0,
  target_namespace=0x8066907 "usb.", source_namespace=0x80668fb "usb_device.") at device.c:200

Thanks,
Kay
-------------- next part --------------
--- hald/linux2/physdev.c	28 Feb 2005 04:53:15 -0000	1.10
+++ hald/linux2/physdev.c	14 Mar 2005 17:12:58 -0000
@@ -319,7 +319,8 @@ usb_add (const gchar *sysfs_path, HalDev
 		hal_device_property_set_string (d, "info.bus", "usb");
 
 		/* take all usb_device.* properties from parent and make them usb.* on this object */
-		hal_device_merge_with_rewrite (d, parent, "usb.", "usb_device.");
+		if (parent)
+			hal_device_merge_with_rewrite (d, parent, "usb.", "usb_device.");
 
 		hal_device_property_set_string (d, "usb.linux.sysfs_path", sysfs_path);
 
-------------- next part --------------
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal


More information about the Hal mailing list