From f7ed4846065be783b85d5d45db004cf38518afae Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 3 Dec 2008 11:43:00 +0000 Subject: [PATCH] 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. --- ChangeLog | 5 +++++ gst/flv/gstflvparse.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index dd5689b042..4381c2f662 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-12-03 Sebastian Dröge + + * gst/flv/gstflvparse.c: (FLV_GET_STRING): + Check if strings are valid UTF8 before using them. + 2008-12-03 Sebastian Dröge * gst/mxf/mxfparse.c: diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c index c4a3cb946c..b15a65ba9f 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; } -- 2.34.1