base:subparse: fix invalid mem access issue 50/311950/1 accepted/tizen/7.0/unified/20240603.162303
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:50:18 +0000 (13:50 +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 934467ade837a2b8daceaa9d4178881b822f5fce..f2756249258f99eee6b0be0330bf40010dea61c9 100644 (file)
@@ -62,7 +62,7 @@
 
 Name:           %{_name}
 Version:        1.20.0
-Release:        58
+Release:        59
 Summary:        Streaming-Media Framework Runtime
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
index 5227247f13d15ca654363096eff52c72599dba9e..15820a1dfd0f81a8289704a73b171a57fea06a1e 100644 (file)
@@ -626,7 +626,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;