From 1c2687e18e2fd999276f9c222ffdee5122cb37cf Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Thu, 30 May 2024 20:13:29 +0900 Subject: [PATCH] base:subparse: fix invalid mem access issue - alloc memory include extra to avoid invalid memory access during looping based on attr[idx] Change-Id: I52e164f26748483331361849a56c8a0bedd8f312 --- packaging/gstreamer.spec | 2 +- subprojects/gst-plugins-base/gst/subparse/samiparse.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index 1994aa5..7c9f713 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -62,7 +62,7 @@ Name: %{_name} Version: 1.22.8 -Release: 7 +Release: 8 Summary: Streaming-Media Framework Runtime License: LGPL-2.0+ Group: Multimedia/Framework diff --git a/subprojects/gst-plugins-base/gst/subparse/samiparse.c b/subprojects/gst-plugins-base/gst/subparse/samiparse.c index 76b438a..ad80e6b 100644 --- a/subprojects/gst-plugins-base/gst/subparse/samiparse.c +++ b/subprojects/gst-plugins-base/gst/subparse/samiparse.c @@ -636,7 +636,7 @@ html_context_handle_element (HtmlContext * ctxt, } g_strfreev (attrs); - attrs = g_new0 (gchar *, count * 2); + attrs = g_new0 (gchar *, count * 2 + 1); for (i = 0; i < count; i++) { gchar *attr_name = NULL, *attr_value = NULL; -- 2.7.4