e_client: fix memory illegal access 17/49317/2
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Mon, 12 Oct 2015 12:19:59 +0000 (21:19 +0900)
committerGwan-gyeong Mun <elongbug@gmail.com>
Mon, 12 Oct 2015 12:29:35 +0000 (05:29 -0700)
Change-Id: I07dbf5b72d09e07aeb764c1fe6cc66da691f0679

src/bin/e_client.c

index 50c537b..562cf84 100644 (file)
@@ -3798,10 +3798,10 @@ e_client_below_get(const E_Client *ec)
                return ec2;
           }
      }
-   if (ec->layer == E_LAYER_CLIENT_DESKTOP) return NULL;
-   if (e_comp_canvas_client_layer_map(ec->layer) == 9999) return NULL;
 
    /* go down the layers until we find one */
+   if (e_comp_canvas_layer_map(ec->layer) == 9999) return NULL;
+   if (e_comp_canvas_layer_map(ec->layer) <= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP)) return NULL;
    for (x = e_comp_canvas_layer_map(ec->layer) - 1; x >= e_comp_canvas_layer_map(E_LAYER_CLIENT_DESKTOP); x--)
      {
         if (!ec->comp->layers[x].clients) continue;