e_keyrouter: fix invalid boundary check for max_tizen_hwkeys 76/178576/2
authorJengHyun Kang <jhyuni.kang@samsung.com>
Thu, 10 May 2018 08:49:41 +0000 (17:49 +0900)
committerJeongHyun Kang <jhyuni.kang@samsung.com>
Thu, 10 May 2018 22:52:06 +0000 (22:52 +0000)
Change-Id: Ia00611e15009c708894cb9d5871db0e0e698b83b

src/bin/e_keyrouter.c
src/bin/e_keyrouter_list.c

index 8f4be3073261ad5cb0a19a231658744769acd6dd..216b71d581092328902949564a49712fcccbd296 100644 (file)
@@ -501,7 +501,7 @@ e_keyrouter_shutdown(void)
 
    _e_keyrouter_deinit_handlers();
 
-   for (i = 0; i < krt->max_tizen_hwkeys+1; i++)
+   for (i = 0; i <= krt->max_tizen_hwkeys; i++)
      {
         if (krt->HardKeys[i].keyname)
           eina_stringshare_del(krt->HardKeys[i].keyname);
index 61a6444ec42e9dd35f989b52bfb6b752b67b48a9..95ee9b2225e6ffa38b92e2ad8e04b875b711f524 100644 (file)
@@ -255,7 +255,7 @@ e_keyrouter_remove_client_from_list(struct wl_resource *surface, struct wl_clien
 
    EINA_SAFETY_ON_TRUE_RETURN(((!surface) && (!wc)));
 
-   for (i = 0; i < krt->max_tizen_hwkeys; i++)
+   for (i = 0; i <= krt->max_tizen_hwkeys; i++)
      {
         if (0 == krt->HardKeys[i].keycode) continue;