After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165365 - [PATCH] gst_string_wrap() segfaults on NULL strings
[PATCH] gst_string_wrap() segfaults on NULL strings
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal blocker
: 0.8.9
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-26 23:57 UTC by Edward Hervey
Modified: 2005-01-28 20:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GstValue : add NULL string handling in gst_string_wrap() (428 bytes, patch)
2005-01-27 00:00 UTC, Edward Hervey
none Details | Review

Description Edward Hervey 2005-01-26 23:57:24 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.
Comment 1 Edward Hervey 2005-01-27 00:00:42 UTC
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.
Comment 2 Ronald Bultje 2005-01-27 10:25:43 UTC
I'm wondering if this is expected behaviour, since value -> string -> value will
go NULL -> "" -> "" here, which makes the conversion non-exact...
Comment 3 Ronald Bultje 2005-01-28 09:37:39 UTC
Applied for now. Still not sure, but we'll see...
Comment 4 David Schleef 2005-01-28 20:14:40 UTC
NULL for a string value is never valid.  Do we care?
Comment 5 Ronald Bultje 2005-01-28 20:25:18 UTC
I don't really. But if it's useful to them, why not...