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.
This commit is contained in:
Sebastian Dröge 2008-12-03 11:43:00 +00:00
parent 19ae0cf61d
commit f7ed484606
2 changed files with 9 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2008-12-03 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/flv/gstflvparse.c: (FLV_GET_STRING):
Check if strings are valid UTF8 before using them.
2008-12-03 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/mxf/mxfparse.c:

View file

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