mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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:
parent
19ae0cf61d
commit
f7ed484606
2 changed files with 9 additions and 0 deletions
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue