diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2008-12-03 11:43:00 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2009-05-12 21:21:01 +0200 |
commit | 351a29c1dfe1993c4ed546d81d3e5491ebcc0ab1 (patch) | |
tree | 754115d0e69b96f7ee6e68b3ae21b97e8619904b | |
parent | d759265a51fa3e5aadf18723a650ae92f859644c (diff) |
[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.
-rw-r--r-- | gst/flv/gstflvparse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/flv/gstflvparse.c b/gst/flv/gstflvparse.c index c4a3cb946..b15a65ba9 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; } |