GNOME Bugzilla – Bug 165365
[PATCH] gst_string_wrap() segfaults on NULL strings
Last modified: 2005-01-28 20:25:18 UTC
When gst_string_wrap() is called with a NULL string (adress == 0x0) it segfaults, which is a pain since it is used by gst_value_serialize() for string-type GValue.
Created attachment 36578 [details] [review] GstValue : add NULL string handling in gst_string_wrap() This patch adds proper handling of NULL strings (adress == 0x0) in gst_string_wrap(). It just returns an empty (but non-NULL) string instead of segfaulting.
I'm wondering if this is expected behaviour, since value -> string -> value will go NULL -> "" -> "" here, which makes the conversion non-exact...
Applied for now. Still not sure, but we'll see...
NULL for a string value is never valid. Do we care?
I don't really. But if it's useful to them, why not...