Add null checker before strcmp 73/117873/1
authorsooyeon.kim <sooyeon.kim@samsung.com>
Fri, 3 Feb 2017 05:36:37 +0000 (14:36 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 8 Mar 2017 01:52:18 +0000 (17:52 -0800)
Change-Id: Ia596f10ff6ec3403d2516f811eef628ddf2c8977
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
(cherry picked from commit 00f4da760eda5e4e0c1d328f2f9c3d01e3addc58)

common/vc_info_parser.c

index da0ab55..08db797 100644 (file)
@@ -320,7 +320,7 @@ int vc_info_parser_get_result(char** result_text, int* event, char** result_mess
                SLOG(LOG_ERROR, vc_info_tag(), "[ERROR] Insert db is failed, ret = %d", ret);
        }
 
-       if (!strcmp(temp_text, "#NULL")) {
+       if (NULL == temp_text || !strcmp(temp_text, "#NULL")) {
                *result_text = NULL;
        } else {
                *result_text = strdup(temp_text);