mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
ssaparse: Search for closing brace after opening brace
Otherwise removing anything between the braces leads to out of bound writes if there is a closing brace before the first opening brace. Thanks to Antonio Morales for finding and reporting the issue. Fixes GHSL-2024-228 Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3870 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8036>
This commit is contained in:
parent
aa07d94c10
commit
15bb318416
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ gst_ssa_parse_remove_override_codes (GstSsaParse * parse, gchar * txt)
|
||||||
gboolean removed_any = FALSE;
|
gboolean removed_any = FALSE;
|
||||||
|
|
||||||
while ((t = strchr (txt, '{'))) {
|
while ((t = strchr (txt, '{'))) {
|
||||||
end = strchr (txt, '}');
|
end = strchr (t, '}');
|
||||||
if (end == NULL) {
|
if (end == NULL) {
|
||||||
GST_WARNING_OBJECT (parse, "Missing { for style override code");
|
GST_WARNING_OBJECT (parse, "Missing { for style override code");
|
||||||
return removed_any;
|
return removed_any;
|
||||||
|
|
Loading…
Reference in a new issue