From: Eunhye Choi Date: Thu, 30 May 2024 11:13:29 +0000 (+0900) Subject: base:subparse: fix invalid mem access issue X-Git-Tag: accepted/tizen/8.0/unified/20240603.162507^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4344921fd9b293117e201b1e3ee18e88732aee39;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/packaging/gstreamer.spec b/packaging/gstreamer.spec index a1180e9841..33459e4561 100644 --- a/packaging/gstreamer.spec +++ b/packaging/gstreamer.spec @@ -62,7 +62,7 @@ Name: %{_name} Version: 1.22.0 -Release: 38 +Release: 39 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 76b438a2ff..ad80e6b66f 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;