From 7f94708de47eba7a509b50a9285410ec4f30338d Mon Sep 17 00:00:00 2001 From: technology208 Date: Thu, 23 May 2024 11:44:24 +0800 Subject: [PATCH] optimize subparse end_tag process --- CVE-2023-37328.patch | 33 +++++++++++++++++++++++++-------- gstreamer1-plugins-base.spec | 5 ++++- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/CVE-2023-37328.patch b/CVE-2023-37328.patch index 70e41ae..4b55ad8 100644 --- a/CVE-2023-37328.patch +++ b/CVE-2023-37328.patch @@ -1,14 +1,14 @@ -From 0f60d9439839dd2a61f74dea6148afad9af4c8a6 Mon Sep 17 00:00:00 2001 +From 87f13216ec814bac49ca3d5e40c9367e670c6fd5 Mon Sep 17 00:00:00 2001 From: technology208 -Date: Thu, 14 Mar 2024 23:31:14 +0800 -Subject: [PATCH] Create Path +Date: Thu, 11 Apr 2024 16:02:41 +0800 +Subject: [PATCH] CreatePatch --- - gst/subparse/gstsubparse.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + gst/subparse/gstsubparse.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gst/subparse/gstsubparse.c b/gst/subparse/gstsubparse.c -index 4254158..7b44307 100644 +index 4254158..e2d446d 100644 --- a/gst/subparse/gstsubparse.c +++ b/gst/subparse/gstsubparse.c @@ -814,7 +814,7 @@ subrip_fix_up_markup (gchar ** p_txt, gconstpointer allowed_tags_ptr) @@ -16,10 +16,27 @@ index 4254158..7b44307 100644 if (*next_tag == '<' && *(next_tag + 1) == '/') { - end_tag = strchr (cur, '>'); -+ end_tag = strchr (end_tag, '>'); ++ end_tag = strchr (next_tag, '>'); if (end_tag) { const gchar *last = NULL; if (num_open_tags > 0) +@@ -822,11 +822,14 @@ subrip_fix_up_markup (gchar ** p_txt, gconstpointer allowed_tags_ptr) + if (num_open_tags == 0 + || g_ascii_strncasecmp (end_tag - 1, last, strlen (last))) { + GST_LOG ("broken input, closing tag '%s' is not open", end_tag - 1); +- memmove (next_tag, end_tag + 1, strlen (end_tag) + 1); +- next_tag -= strlen (end_tag); ++ memmove (next_tag, end_tag + 1, strlen (end_tag)); ++ cur = next_tag; ++ continue; + } else { + --num_open_tags; + g_ptr_array_remove_index (open_tags, num_open_tags); ++ cur = end_tag + 1; ++ continue; + } + } + } -- -2.33.0 +2.43.0 diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index bfe4836..42d8db0 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -3,7 +3,7 @@ Name: gstreamer1-plugins-base Version: 1.16.2 -Release: 3 +Release: 4 Summary: GStreamer streaming media framework base plugins License: LGPLv2+ URL: http://gstreamer.freedesktop.org/ @@ -276,6 +276,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -fv {} ';' %{_mandir}/man1/gst-device-monitor-*.gz %changelog +* Thu May 23 2024 technology208 - 1.16.2-4 +- optimize subparse end_tag process + * Fri Mar 15 2024 technology208 - 1.16.2-3 - fix CVE-2023-37328 -- Gitee