diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-03 11:43:00 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-03 11:43:00 +0000 |
commit | f7ed4846065be783b85d5d45db004cf38518afae (patch) | |
tree | 1e65045695f350ee87acb8745f0934ea5a635c89 /gst/flv | |
parent | 19ae0cf61da0ec571c7bce6335240c52c98020c9 (diff) | |
download | gst-plugins-bad-f7ed4846065be783b85d5d45db004cf38518afae.tar.gz gst-plugins-bad-f7ed4846065be783b85d5d45db004cf38518afae.tar.bz2 gst-plugins-bad-f7ed4846065be783b85d5d45db004cf38518afae.zip |
gst/flv/gstflvparse.c: Check if strings are valid UTF8 before using them.
Original commit message from CVS:
* gst/flv/gstflvparse.c: (FLV_GET_STRING):
Check if strings are valid UTF8 before using them.
Diffstat (limited to 'gst/flv')
-rw-r--r-- | gst/flv/gstflvparse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c index c4a3cb94..b15a65ba 100644 --- a/gst/flv/gstflvparse.c +++ b/gst/flv/gstflvparse.c @@ -52,6 +52,10 @@ FLV_GET_STRING (GstByteReader * reader) } memcpy (string, str, string_size); + if (!g_utf8_validate (string, string_size, NULL)) { + g_free (string); + return NULL; + } return string; } |