[PATCH] fix usage of unchecked returnval from hal_util_strdup_valid_utf8()

Danny Kukawka danny.kukawka at web.de
Mon Sep 11 14:13:50 PDT 2006


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 
      GLib-CRITICAL **: g_strlcpy: assertion `src != NULL' failed

Please review.


 coldplug.c |   63 +++++++++++++++++++++++++++++----------------------
 osspec.c   |   63 +++++++++++++++++++++++++++++----------------------
 2 files changed, 72 insertions(+), 54 deletions(-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-fix-SIGABRT_from_unchecked_hal_util_strdup_valid_utf8.diff
Type: text/x-diff
Size: 8153 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20060911/f5cdd3c3/hal-fix-SIGABRT_from_unchecked_hal_util_strdup_valid_utf8.bin

More information about the hal mailing list