From: Hyunho Kang Date: Mon, 21 Dec 2015 04:10:00 +0000 (+0900) Subject: Fix INTEGER OVERFLOW X-Git-Tag: submit/tizen/20151221.112821~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=911ec92e34119133bafa08a7c00524459337efd9;p=platform%2Fcore%2Fappfw%2Fdata-control.git Fix INTEGER OVERFLOW Change-Id: Ia51b62e2dafb28e4282a1e8ea61fbe351074a2df Signed-off-by: Hyunho Kang --- diff --git a/src/data-control-map.c b/src/data-control-map.c index 443ca4a..c0a8477 100755 --- a/src/data-control-map.c +++ b/src/data-control-map.c @@ -799,9 +799,9 @@ int datacontrol_map_get_with_page(datacontrol_h provider, const char *key, int * LOGI("Gets the value list from provider_id: %s, data_id: %s", provider->provider_id, provider->data_id); - long long arg_size = (strlen(provider->data_id) + strlen(key)) * sizeof(wchar_t); + unsigned int arg_size = (strlen(provider->data_id) + strlen(key)) * sizeof(wchar_t); if (arg_size > MAX_ARGUMENT_SIZE) { - LOGE("The size of sending argument (%lld) exceeds the maximum limit.", arg_size); + LOGE("The size of sending argument (%u) exceeds the maximum limit.", arg_size); return DATACONTROL_ERROR_MAX_EXCEEDED; } @@ -859,9 +859,9 @@ int datacontrol_map_set(datacontrol_h provider, const char *key, const char *old LOGI("Sets the old value to new value in provider_id: %s, data_id: %s", provider->provider_id, provider->data_id); - long long arg_size = (strlen(provider->data_id) + strlen(key) + strlen(old_value) + strlen(new_value)) * sizeof(wchar_t); + unsigned int arg_size = (strlen(provider->data_id) + strlen(key) + strlen(old_value) + strlen(new_value)) * sizeof(wchar_t); if (arg_size > MAX_ARGUMENT_SIZE) { - LOGE("The size of sending argument (%lld) exceeds the maximum limit.", arg_size); + LOGE("The size of sending argument (%u) exceeds the maximum limit.", arg_size); return DATACONTROL_ERROR_MAX_EXCEEDED; } @@ -901,9 +901,9 @@ int datacontrol_map_add(datacontrol_h provider, const char *key, const char *val LOGI("Adds the value in provider_id: %s, data_id: %s", provider->provider_id, provider->data_id); - long long arg_size = (strlen(provider->data_id) + strlen(key) + strlen(value)) * sizeof(wchar_t); + unsigned int arg_size = (strlen(provider->data_id) + strlen(key) + strlen(value)) * sizeof(wchar_t); if (arg_size > MAX_ARGUMENT_SIZE) { - LOGE("The size of sending argument (%lld) exceeds the maximum limit.", arg_size); + LOGE("The size of sending argument (%u) exceeds the maximum limit.", arg_size); return DATACONTROL_ERROR_MAX_EXCEEDED; } @@ -942,9 +942,9 @@ int datacontrol_map_remove(datacontrol_h provider, const char *key, const char * LOGI("Removes the value in provider_id: %s, data_id: %s", provider->provider_id, provider->data_id); - long long arg_size = (strlen(provider->data_id) + strlen(key) + strlen(value)) * sizeof(wchar_t); + unsigned int arg_size = (strlen(provider->data_id) + strlen(key) + strlen(value)) * sizeof(wchar_t); if (arg_size > MAX_ARGUMENT_SIZE) { - LOGE("The size of sending argument (%lld) exceeds the maximum limit.", arg_size); + LOGE("The size of sending argument (%u) exceeds the maximum limit.", arg_size); return DATACONTROL_ERROR_MAX_EXCEEDED; }