raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=b30daea12c75995f6a9c34c5a000b0c3207f9c45

commit b30daea12c75995f6a9c34c5a000b0c3207f9c45
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Aug 6 18:51:08 2019 +0100

    e client - check picmap type to be one of the only 2 valid ones
    
    fix CID 1403938
---
 src/bin/e_client.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/e_client.c b/src/bin/e_client.c
index 608968a76..9c592493b 100644
--- a/src/bin/e_client.c
+++ b/src/bin/e_client.c
@@ -2632,8 +2632,10 @@ E_API E_Client *
 e_client_new(E_Pixmap *cp, int first_map, int internal)
 {
    E_Client *ec;
+   E_Pixmap_Type ptype = e_pixmap_type_get(cp);
 
-   if (eina_hash_find(clients_hash[e_pixmap_type_get(cp)], &cp)) return NULL;
+   if ((ptype != E_PIXMAP_TYPE_X) && (ptype != E_PIXMAP_TYPE_WL)) return NULL;
+   if (eina_hash_find(clients_hash[ptype], &cp)) return NULL;
 
    ec = E_OBJECT_ALLOC(E_Client, E_CLIENT_TYPE, _e_client_free);
    if (!ec) return NULL;
@@ -2716,7 +2718,7 @@ e_client_new(E_Pixmap *cp, int first_map, int internal)
    ec->netwm.opacity = 255;
 
    e_comp->clients = eina_list_append(e_comp->clients, ec);
-   eina_hash_add(clients_hash[e_pixmap_type_get(cp)], &ec->pixmap, ec);
+   eina_hash_add(clients_hash[ptype], &ec->pixmap, ec);
 
    if (!ec->ignored) EC_CHANGED(ec);
 

-- 


Reply via email to