summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-12-03 11:43:00 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-12-03 11:43:00 +0000
commitf7ed4846065be783b85d5d45db004cf38518afae (patch)
tree1e65045695f350ee87acb8745f0934ea5a635c89
parent19ae0cf61da0ec571c7bce6335240c52c98020c9 (diff)
downloadgst-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.
-rw-r--r--ChangeLog5
-rw-r--r--gst/flv/gstflvparse.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index dd5689b0..4381c2f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-12-03 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * gst/flv/gstflvparse.c: (FLV_GET_STRING):
+ Check if strings are valid UTF8 before using them.
+
+2008-12-03 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* gst/mxf/mxfparse.c:
Remove FIXME, zero-ULs and UMIDs are really invalid and we can
use them as "unset" value.
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;
}