Fix SVACE issue 33/104733/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 14 Dec 2016 07:44:28 +0000 (16:44 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 14 Dec 2016 07:44:28 +0000 (16:44 +0900)
Change-Id: Ida5604af5260c977a819741581e884da6b539345
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
common/vc_cmd_db.c

index 5ed395c..7696982 100644 (file)
@@ -1298,7 +1298,9 @@ static int __vc_db_generate_command(vc_cmd_s* cmd, char** fixed_cmd, GSList** cm
 
                // remove close brace, '}'
                char* temp_close = strchr(src_cmd, '}');
-               temp_close[0] = '\0';
+               if (NULL != temp_close) {
+                       temp_close[0] = '\0';
+               }
 
                // extract fixed command and remove space in front of  '{'
                char *tok_ptr = NULL;