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; }