GNOME Bugzilla – Bug 318192
css_value_to_string may return NULL which will get used without checking
Last modified: 2005-10-26 02:04:33 UTC
Steps to reproduce: Invalid CSS will crash the widget because css_value_to_string() will return NULL if value is CSS_VALUE_LIST. Example entry is: font-family: 10px/14px verdana, trebuchet, sans-serif; i.e. when specification is for "font:" but the list is preceeded with "font-family:" instead. Stack trace: 0x004713f9 in strcat () from /lib/tls/libc.so.6 (gdb) where
+ Trace 63413
Other information: I will attach a patch that checks the returned value but I am not sure whether that's the intended behaviour, perhaps css_value_to_string() should not return NULL?
Created attachment 53175 [details] [review] Proposed patch This patch checks the return value of css_value_to_string() and avoids the segmentation fault.
I should add this happens for current source as in the CVS repository.
Committed to CVS. Thanks for the patch.