e_zone_video, e_comp_wl: Add NULL check code to prevent dereferencing.
authorSeunghun <shiin.lee@samsung.com>
Thu, 17 Jan 2019 06:55:40 +0000 (15:55 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 12 Apr 2019 10:00:22 +0000 (19:00 +0900)
Change-Id: I0246771300bc3d185def1e645dee4837a55494ba

src/bin/e_comp_wl.c
src/bin/video/e_zone_video.c

index 0aae62c8bc9a0715b83b52adaaa9a26d7ade729f..2b5f7d98744aec27e78005564220cb819798f188 100644 (file)
@@ -2346,6 +2346,8 @@ _e_comp_wl_subsurface_can_show(E_Client *ec)
 
    invisible_parent = _e_comp_wl_subsurface_invisible_parent_get(ec);
    topmost = e_comp_wl_topmost_parent_get(ec);
+   if (!topmost)
+     return EINA_FALSE;
 
    /* if topmost is composited by compositor && if there is a invisible parent */
    if (topmost->redirected && invisible_parent)
index 6c55b855bd2696b941c4e1c43511bf61dc2da6a6..3f17c480446b845b91337fbdae46d5bdf1376d82 100644 (file)
@@ -23,6 +23,8 @@ e_zone_video_available_size_get(E_Zone *zone, int *minw, int *minh, int *maxw, i
    int rminw = -1, rminh = -1, rmaxw = -1, rmaxh = -1, ralign = -1;
 
    output = e_output_find(zone->output_id);
+   if (!output)
+     return EINA_FALSE;
 
    tdm_output_get_available_size(output->toutput, &ominw, &ominh, &omaxw, &omaxh, &oalign);
    if (!e_comp_screen_pp_support())