[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.
This commit is contained in:
Sebastian Dröge 2008-12-03 11:43:00 +00:00 committed by Sebastian Dröge
parent d759265a51
commit 351a29c1df

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