e_client: fixed a bug for buffer overflow 22/92422/2 accepted/tizen/ivi/20161017.080322 accepted/tizen/mobile/20161017.080230 accepted/tizen/tv/20161017.080246 accepted/tizen/wearable/20161017.080303 submit/tizen/20161017.025753
authorDoyoun Kang <doyoun.kang@samsung.com>
Mon, 17 Oct 2016 02:44:29 +0000 (11:44 +0900)
committerGwanglim Lee <gl77.lee@samsung.com>
Mon, 17 Oct 2016 02:54:41 +0000 (19:54 -0700)
Change-Id: I92a60dc015b734eb12741b4d096ead076941bf21

src/bin/e_client.c

index 35aa217..c6e26d8 100644 (file)
@@ -745,6 +745,7 @@ _e_client_find_focus_same_layer(E_Client *ec)
    zone_h = zone->h;
 
    id = e_comp_canvas_layer_map(ec->layer);
+   if (id >= E_LAYER_COUNT) return NULL;
    if (!e_comp->layers[id].clients) return NULL;
 
    EINA_INLIST_REVERSE_FOREACH(e_comp->layers[id].clients, temp_ec)