From 351a29c1dfe1993c4ed546d81d3e5491ebcc0ab1 Mon Sep 17 00:00:00 2001 From: Sebastian Dröge Date: Wed, 3 Dec 2008 11:43:00 +0000 Subject: [MOVED FROM BAD 48/57] 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