Fix build warnings for gcc 9 77/220977/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_unified tizen_6.0 tizen_6.0_hotfix tizen_6.5 accepted/tizen/6.0/unified/20201030.113941 accepted/tizen/6.0/unified/hotfix/20201103.002108 accepted/tizen/6.5/unified/20211028.120733 accepted/tizen/unified/20191227.142628 submit/tizen/20191227.083406 submit/tizen_6.0/20201029.205105 submit/tizen_6.0_hotfix/20201102.192505 submit/tizen_6.0_hotfix/20201103.114805 submit/tizen_6.5/20211028.162501 tizen_6.0.m2_release tizen_6.5.m2_release
authorSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 06:24:06 +0000 (15:24 +0900)
committerSemun Lee <semun.lee@samsung.com>
Thu, 26 Dec 2019 06:24:06 +0000 (15:24 +0900)
Just increased buffer size

Change-Id: Ifc4beac2f746000ab5eb0575aa9adf9e0a53e6db
Signed-off-by: Semun Lee <semun.lee@samsung.com>
src/database_main.c

index 98dcde7..5af22a0 100644 (file)
@@ -219,7 +219,7 @@ static gboolean _read_query_database_internal(Storage *strg, void *handle, const
                out_param_data = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
 
                for (local_index = 0; local_index < out_param_cnt; local_index++) {
-                       char tmp_key[10];
+                       char tmp_key[32];
                        const unsigned char *tmp;
                        tmp = sqlite3_column_text(stmt, local_index);
                        snprintf(tmp_key, sizeof(tmp_key), "%d", local_index);
@@ -230,7 +230,7 @@ static gboolean _read_query_database_internal(Storage *strg, void *handle, const
                        GSList **temp = out_param;
                        *temp = g_slist_append(*temp, out_param_data);
                } else {
-                       char tmp_key_outter[10];
+                       char tmp_key_outter[32];
                        snprintf(tmp_key_outter, sizeof(tmp_key_outter), "%d", outter_index);
                        g_hash_table_insert((GHashTable*)out_param, g_strdup(tmp_key_outter), out_param_data);
                }