message: Ensure that the "debug" field of error/warning/info messages is valid UTF-8
authorSebastian Dröge <sebastian@centricular.com>
Mon, 28 Nov 2016 10:28:28 +0000 (12:28 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 28 Nov 2016 10:32:16 +0000 (12:32 +0200)
commit6dcf8263e8354b2586f8d5bce4e6d3192d2fe3af
tree354fc6db4a21726e402224558757dc50a3edee32
parent11b36931a1ce399df4317e6f888e5d696ec53bc5
message: Ensure that the "debug" field of error/warning/info messages is valid UTF-8

The caller might pass arbitrary data here that caused the error, and
trying to set invalid UTF-8 in a GstStructure causes it to be not set at
all. Later when trying to parse it, the field will not exist and the
return value will point to invalid memory. Prevent this by storing NULL
instead.

Also print a g_warning(), the caller should never ever do this to begin
with.
gst/gstmessage.c