mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
typefindfunctions: Add missing length check to XML typefinder
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=54811 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3690>
This commit is contained in:
parent
54ff9b2b5f
commit
fa2b98f957
1 changed files with 3 additions and 0 deletions
|
@ -570,6 +570,9 @@ xml_check_first_element_from_data (const guint8 * data, guint length,
|
|||
length -= (ptr - data);
|
||||
data = ptr;
|
||||
|
||||
if (length < 2)
|
||||
return FALSE;
|
||||
|
||||
got_xmldec = (memcmp (data, "?>", 2) == 0);
|
||||
if (!got_xmldec)
|
||||
return FALSE;
|
||||
|
|
Loading…
Reference in a new issue