base:subparse: fix invalid mem access issue 48/311948/1 accepted/tizen/8.0/unified/20240603.162507
authorEunhye Choi <eunhae1.choi@samsung.com>
Thu, 30 May 2024 11:13:29 +0000 (20:13 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Fri, 31 May 2024 04:49:03 +0000 (13:49 +0900)
- alloc memory include extra to avoid invalid memory access
  during looping based on attr[idx]

Change-Id: I52e164f26748483331361849a56c8a0bedd8f312

packaging/gstreamer.spec
subprojects/gst-plugins-base/gst/subparse/samiparse.c

index a1180e984136d0b16681f9bb9e6935e3b71e6ee5..33459e4561e9ba1868ee918fdc8ea37c605372d5 100644 (file)
@@ -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
index 76b438a2ffc95e18c785d968ea11c9faa7308395..ad80e6b66f6bdd997b03784536b951ac874f0c79 100644 (file)
@@ -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;