diff options
author | Seonah Moon <seonah1.moon@samsung.com> | 2021-06-11 11:22:21 +0900 |
---|---|---|
committer | Seonah Moon <seonah1.moon@samsung.com> | 2021-06-11 11:22:26 +0900 |
commit | 4ccab15ec9b6f03064fec0e27e961a0d81230ae4 (patch) | |
tree | 4a4d2a0b71cf3abdba29d2e5c0046afe704568c2 | |
parent | a1b1ec217689c948e1761af6c4174089fa396426 (diff) | |
download | wifi-4ccab15ec9b6f03064fec0e27e961a0d81230ae4.tar.gz wifi-4ccab15ec9b6f03064fec0e27e961a0d81230ae4.tar.bz2 wifi-4ccab15ec9b6f03064fec0e27e961a0d81230ae4.zip |
Avoid integer overflowsubmit/tizen/20210611.024059accepted/tizen/unified/20210616.132554
Change-Id: I7251548c90459b79b9fa0419c1f88dea8b98cf87
-rw-r--r-- | packaging/org.tizen.w-wifi.spec | 2 | ||||
-rwxr-xr-x | sources/wearable/src/wearable-circle/view/layout_scan.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/packaging/org.tizen.w-wifi.spec b/packaging/org.tizen.w-wifi.spec index c3e1a25..e2ba63f 100644 --- a/packaging/org.tizen.w-wifi.spec +++ b/packaging/org.tizen.w-wifi.spec @@ -1,6 +1,6 @@ Name: org.tizen.w-wifi Summary: Wi-Fi UI Gadget for TIZEN wearable -Version: 1.0.236 +Version: 1.0.237 Release: 1 Group: App/Network License: Flora-1.1 diff --git a/sources/wearable/src/wearable-circle/view/layout_scan.c b/sources/wearable/src/wearable-circle/view/layout_scan.c index d00d1d3..a6cb838 100755 --- a/sources/wearable/src/wearable-circle/view/layout_scan.c +++ b/sources/wearable/src/wearable-circle/view/layout_scan.c @@ -340,15 +340,17 @@ static gboolean _ap_list_item_data_change(layout_scan_object *self, static gboolean _ap_list_update_ap_items(layout_scan_object *self) { GList *l = self->ap_data_list; - guint index, old_items_count = elm_genlist_items_count(self->ap_list) - 1; + guint index, old_items_count = elm_genlist_items_count(self->ap_list); guint new_items_count = g_list_length(self->ap_data_list); Elm_Genlist_Item_Class *wifi_ap_itc = _create_wifi_ap_itc(self); Elm_Object_Item *ap_item = NULL; __WIFI_FUNC_ENTER__; - WIFI_RET_VAL_IF_FAIL(old_items_count >= 0, FALSE); + WIFI_RET_VAL_IF_FAIL(old_items_count >= 1, FALSE); WIFI_RET_VAL_IF_FAIL(wifi_ap_itc != NULL, FALSE); + old_items_count -= 1; + if (new_items_count < old_items_count) { guint rm_index; for (rm_index = old_items_count; rm_index > new_items_count; rm_index--) { |