wl_egl : Prevent access to NULL pointer 20/217620/1 submit/tizen/20191113.212006
authorJunsuChoi <jsuya.choi@samsung.com>
Wed, 13 Nov 2019 04:40:44 +0000 (13:40 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Wed, 13 Nov 2019 04:47:27 +0000 (13:47 +0900)
Summary: The pointer s can be null.

Test Plan: N/A

Reviewers: Jaehyun_Cho, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10654

Change-Id: I2db21b24180bb9a29811617f9996e7f5bdf36196

src/modules/evas/engines/wayland_egl/evas_wl_main.c

index 8abed98..17e731e 100755 (executable)
@@ -133,7 +133,7 @@ eng_window_new(Evas_Engine_Info_Wayland *einfo, int w, int h, Render_Output_Swap
 
    wl_disp = ecore_wl2_display_get(gw->wl2_disp);
    const char *s = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
-   if (strstr(s, "EXT_platform_base"))
+   if (s && strstr(s, "EXT_platform_base"))
      {
         EGLDisplay (*func) (EGLenum platform, void *native_display, const EGLint *attrib_list);
         func = (void *)eglGetProcAddress("eglGetPlatformDisplayEXT");