Khem Raj
ce1f1c9eff
ssaparse: include required system headers for isspace() and sscanf() functions
...
Newer compilers ( clang 15 ) have turned stricter and errors out instead
of warning on implicit function declations
Fixes
gstssaparse.c:297:12: error: call to undeclared library function 'isspace' with type 'int (int)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
while (isspace(*t))
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2879 >
2022-08-14 08:32:05 +00:00
Tim-Philipp Müller
f19f579712
samiparse: clean up some GString usage
...
There's no need to re-assign the return value of
g_string_append_*() functions and such to the variable
holding the GString. These return values are just for
convenience so function calls can be chained. The actual
GString pointer won't change, it's not a GList after all.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685 >
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller
270d23c8e0
samiparse: micro-optimise entity handling
...
Avoid relocations and hard-code entity string length
in the struct, since we basically get it for free here.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685 >
2022-07-01 17:24:52 +00:00
Tim-Philipp Müller
84a3b0ef87
samiparse: fix handling of self-closing tags
...
We would check the wrong string (rest of line rather than element)
for the / suffix of self-closing tags, which is not only wrong but
also has atrocious performance with certain strings like the garbled
nonsense clusterfuzz feeds us, which might cause discoverer to time
out when processing garbled SAMI files.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=47461
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2685 >
2022-07-01 17:24:52 +00:00
Matthew Waters
0f9f179bec
subparse: don't deref a potentially NULL variable
...
If the html SAMI data is malformed, then retrieving the attribute name
may fail. We then cannot retrieve the attribute value.
Fixes: https://oss-fuzz.com/testcase-detail/4700130671984640
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2317 >
2022-04-28 15:35:12 +10:00
Matthew Waters
c2ac57f6c9
subparse: don't try to index string with -1
...
If the len of the string turns out to be 0, str[len - 1] resolved to
str[-1] which is not a good idea.
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=46543
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2147 >
2022-04-10 10:57:08 +10:00
Edward Hervey
b6303c46b7
subparse: Handle GAP events before buffers
...
Make sure we did initial negotiation and segment pushing if we get GAP events
before buffers.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1903 >
2022-03-09 23:58:07 +00:00
Tim-Philipp Müller
5660743bbf
subparse: don't use g_warning() for malformed input
...
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1009 >
2021-10-19 00:12:25 +00:00
Thibault Saunier
2fd28195ca
Move files from gst-plugins-base into the "subprojects/gst-plugins-base/" subdir
2021-09-24 16:13:26 -03:00