[PATCH] fix segfault in hal-storage-mount and don't lose fstype in probe-volume
Simon Munton
simon-hal at munton.demon.co.uk
Sun May 24 02:31:31 PDT 2009
Attached patch checks that return value of libhal_volume_get_fstype() is not
NULL before being passed to strcmp() in hal-storage-mount.c
It also changes:
if (libhal_changeset_set_property_string (cs, "volume.fstype", type))
to
if (!libhal_changeset_set_property_string (cs, "volume.fstype", type))
in hald/linux/probing/probe-volume.c.
This is how it was in 0.5.11, the change made in 0.5.12 causes
libhal_changeset_set_property_string() to be called twice for "volume.fstype",
the second time the the type is an empty string, which then makes hal lose the
fstype.
This appears to be the only time the return value of
libhal_changeset_set_property_string() is checked; all other calls don't
check, perhaps this instance should be changed to not check too?
Regards
Simon Munton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-0.5.12.diff
Type: text/x-patch
Size: 1242 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20090524/67d1f7a3/attachment.bin
More information about the hal
mailing list