mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
flvdemux: Handle empty metadata strings
g_utf8_validate() errors out on empty string. But empty strings are valid, so only check if they're not Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/596>
This commit is contained in:
parent
9f5f906515
commit
e8282661b6
1 changed files with 2 additions and 1 deletions
|
@ -202,7 +202,8 @@ FLV_GET_STRING (GstByteReader * reader)
|
|||
}
|
||||
|
||||
memcpy (string, str, string_size);
|
||||
if (!g_utf8_validate (string, string_size, NULL)) {
|
||||
/* Check utf-8 validity if it's not an empty string */
|
||||
if (string[0] && !g_utf8_validate (string, string_size, NULL)) {
|
||||
g_free (string);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue