subparse: Look for the closing `>` of a tag after the opening `<`
authorSebastian Dröge <sebastian@centricular.com>
Tue, 13 Jun 2023 09:53:13 +0000 (12:53 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 20 Jun 2023 09:23:07 +0000 (09:23 +0000)
commit518ecba8f960137715f776dac6c93e4c4e4179d1
tree723ef953425f0bb14c6b4dfe27f0d531a5be2141
parent7bcd791fabe03b9ab1c72f494fc86cd0c06c3556
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/4898>
subprojects/gst-plugins-base/gst/subparse/gstsubparse.c