[Conf] Bugfix of array out of bound
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 30 Jan 2019 10:36:02 +0000 (19:36 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Thu, 31 Jan 2019 05:34:30 +0000 (14:34 +0900)
The last element of vstr should be NULL.
Set NULL for such elements

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gst/nnstreamer/nnstreamer_conf.c

index dad8ce0..b3bc0a3 100644 (file)
@@ -190,6 +190,9 @@ _fill_in_vstr (gchar *** fullpath_vstr, gchar *** basename_vstr,
   *fullpath_vstr = g_malloc_n (counterF + 1, sizeof (gchar *));
   *basename_vstr = g_malloc_n (counterB + 1, sizeof (gchar *));
 
+  (*fullpath_vstr)[counterF] = NULL;
+  (*basename_vstr)[counterB] = NULL;
+
   vstrF.vstr = *fullpath_vstr;
   vstrB.vstr = *basename_vstr;
   vstrF.size = counterF;