From f7ed4846065be783b85d5d45db004cf38518afae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 3 Dec 2008 11:43:00 +0000 Subject: 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. --- gst/flv/gstflvparse.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gst/flv') 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; } -- cgit v1.2.1