[Svace] Fix the array overflow issue
authorSangjung Woo <sangjung.woo@samsung.com>
Fri, 16 Dec 2022 02:38:24 +0000 (11:38 +0900)
committerSangjung Woo <again4you@gmail.com>
Fri, 16 Dec 2022 05:58:24 +0000 (14:58 +0900)
The result of 'sizeof (dump_list_type) / sizeof (nnsconf_type_path)' is
4 but dump_list_str array has only 3 items. Because of this reason, it
can occur the array overflow issue. This patch fixes this issue.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
gst/nnstreamer/nnstreamer_conf.c

index c2a84b0..e1c94fa 100644 (file)
@@ -699,7 +699,7 @@ nnsconf_subplugin_dump (gchar * str, gulong size)
     NNSCONF_PATH_TRAINERS
   };
   static const char *dump_list_str[] = {
-    "Filter", "Decoder", "Conterver"
+    "Filter", "Decoder", "Conterver", "Trainer"
   };
 
   dump_buf buf;