mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
subparse: Look for the closing >
of a tag after the opening <
Previously when fixing up subrip markip, we were looking from the start of the remaining buffer instead. Due to how skipping over closing tags works, the remaining buffer will still contain the closing `>` of the previous tag so if a unexpected closing tag is found after another closing tag, we would potentially do an out of bounds memmove(). Fixes ZDI-CAN-20968 Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2662 Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4895>
This commit is contained in:
parent
fa30504ec2
commit
97c6d7495e
1 changed files with 1 additions and 1 deletions
|
@ -776,7 +776,7 @@ subrip_fix_up_markup (gchar ** p_txt, gconstpointer allowed_tags_ptr)
|
|||
}
|
||||
|
||||
if (*next_tag == '<' && *(next_tag + 1) == '/') {
|
||||
end_tag = strchr (cur, '>');
|
||||
end_tag = strchr (next_tag, '>');
|
||||
if (end_tag) {
|
||||
const gchar *last = NULL;
|
||||
if (num_open_tags > 0)
|
||||
|
|
Loading…
Reference in a new issue