mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
[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:
parent
d759265a51
commit
351a29c1df
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ FLV_GET_STRING (GstByteReader * reader)
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy (string, str, string_size);
|
memcpy (string, str, string_size);
|
||||||
|
if (!g_utf8_validate (string, string_size, NULL)) {
|
||||||
|
g_free (string);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue