ASAN issue resolved 75/293475/2 accepted/tizen/unified/20230601.162934
authorKamaljeet Chauhan <kamal.jc@samsung.com>
Tue, 30 May 2023 05:43:43 +0000 (11:13 +0530)
committerKamaljeet Chauhan <kamal.jc@samsung.com>
Tue, 30 May 2023 06:21:32 +0000 (11:51 +0530)
Change-Id: Iff8933cba5d454f187eb6255ce93e6f592b6a923
Signed-off-by: Kamaljeet Chauhan <kamal.jc@samsung.com>
email-core/email-storage/email-storage.c

index bec5fd5..b707878 100755 (executable)
@@ -4967,7 +4967,7 @@ INTERNAL_FUNC int emstorage_add_account(char *multi_user_name, emstorage_account
        EM_DEBUG_DB_EXEC(SQLITE_OK != rc, {error = EMAIL_ERROR_DB_FAILURE; sqlite3_free_table(result); goto FINISH_OFF; },
                        ("SQL(%s) sqlite3_get_table fail:%d -%s", sql, rc, sqlite3_errmsg(local_db_handle)));
 
-       if (NULL == result[1]) rc = 1;
+       if (row_count == 0 || NULL == result[1]) rc = 1;
        else {
                for (i = 1; i <= row_count; i++) {
                        if (i != atoi(result[i]))