This change prevents to access the e_comp->layers list out of bounds.
Change-Id: I7e7ca5938ea23cd8b515f0ccf113052cb8a0bd00
}
}
+ 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) > e_comp_canvas_layer_map(E_LAYER_MAX)) return NULL;
x = e_comp_canvas_layer_map(ec->layer);
if (x > 0) x--;
/* prevents to access the e_comp->layers list out of bounds. */
ELOGF("WARNING", "Used not defined layer:%d", NULL, NULL, layer);
- return E_LAYER_MAX;
+ return E_LAYER_COUNT - 1;
}
E_API unsigned int