You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.5 KiB
37 lines
1.5 KiB
From f7f24aed62178dc1deb581a512029dcb20727137 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
|
Date: Tue, 13 Jun 2023 12:53:13 +0300
|
|
Subject: [PATCH 3/8] 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>
|
|
---
|
|
subprojects/gst-plugins-base/gst/subparse/gstsubparse.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/subprojects/gst-plugins-base/gst/subparse/gstsubparse.c b/subprojects/gst-plugins-base/gst/subparse/gstsubparse.c
|
|
index 7aa922cdd8..d0960a971a 100644
|
|
--- a/subprojects/gst-plugins-base/gst/subparse/gstsubparse.c
|
|
+++ b/subprojects/gst-plugins-base/gst/subparse/gstsubparse.c
|
|
@@ -779,7 +779,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)
|
|
--
|
|
2.47.0
|
|
|