typefindfunctions: Reduce XML typefinder minimum data size from 64 to 32 bytes

64 bytes makes the typefinder fail on very small XML documents on which
it succeeded previously.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3690>
This commit is contained in:
Sebastian Dröge 2023-01-06 14:37:31 +02:00
parent 37f219bd57
commit 54ff9b2b5f

View file

@ -660,7 +660,7 @@ xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
/* try a default that should be enough */
if (length == 0)
length = 512;
else if (length < 64)
else if (length < 32)
return FALSE;
else /* the first few bytes should be enough */
length = MIN (4096, length);