[PATCH] fix usage of unchecked returnval from
hal_util_strdup_valid_utf8()
David Zeuthen
david at fubar.dk
Mon Sep 11 14:47:31 PDT 2006
On Mon, 2006-09-11 at 23:13 +0200, Danny Kukawka wrote:
> Hi,
>
> this patch fixes the usage of unchecked returnvalue from
> hal_util_strdup_valid_utf8(). The function returns NULL if there is no way to
> return a valid or a fixed validate string. A uncheck usage can cause this
> error:
>
> GLib-CRITICAL **: g_strlcpy: assertion `src != NULL' failed
>
> Please review.
Looks good to me, thanks. Looks like udev ought to not provide data
which is not UTF-8, it should probably be fixed in udev too. Or perhaps
not, depends on udev and whether it just should return raw data. Kay?
David
More information about the hal
mailing list