Fix wrong size memory alloc 30/106630/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.121936 accepted/tizen/3.0.m2/tv/20170104.122431 accepted/tizen/3.0.m2/wearable/20170104.122831 accepted/tizen/3.0/common/20161223.110644 accepted/tizen/3.0/ivi/20161223.081708 accepted/tizen/3.0/mobile/20161223.081612 accepted/tizen/3.0/tv/20161223.081629 accepted/tizen/3.0/wearable/20161223.081650 submit/tizen_3.0.m2/20170104.093749 submit/tizen_3.0/20161222.060248 submit/tizen_3.0/20161222.093853
authorHyunho Kang <hhstark.kang@samsung.com>
Thu, 22 Dec 2016 08:11:58 +0000 (17:11 +0900)
committerHyunho Kang <hhstark.kang@samsung.com>
Thu, 22 Dec 2016 08:29:45 +0000 (17:29 +0900)
off_t size will be long size in 64bit

Change-Id: I9b6e0adf16a5a9832180d99f99018022a7415dbe
Signed-off-by: Hyunho Kang <hhstark.kang@samsung.com>
src/data-control-sql.c

index 139043f..def4f47 100755 (executable)
@@ -527,7 +527,7 @@ static int __recv_sql_select_process(bundle *kb, int fd, resultset_cursor *curso
        }
 
        cursor->resultset_row_count = row_count;
-       cursor->row_offset_list = (off_t *)calloc(row_count, sizeof(int));
+       cursor->row_offset_list = (off_t *)calloc(row_count, sizeof(off_t));
        if (cursor->row_offset_list == NULL) {
                LOGE("Out of memory. can not alloc row_offset_list.");
                goto out;
@@ -538,7 +538,7 @@ static int __recv_sql_select_process(bundle *kb, int fd, resultset_cursor *curso
 
        LOGE("resultset_content_offset : %d", cursor->resultset_content_offset);
 
-       sqlite3_int64 row_offset = 0;
+       off_t row_offset = 0;
        for (i = 0; i < row_count; i++) {
                row_offset = 0;
                for (j = 0; j < column_count; j++) {