ecore_evas: Check for null ptr deref 88/167788/4
authorMyoungwoon Roy, Kim <myoungwoon.kim@samsung.com>
Mon, 22 Jan 2018 05:44:09 +0000 (14:44 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Mon, 22 Jan 2018 09:25:22 +0000 (09:25 +0000)
This patch fixes a tentative crash owing to ptr deference.
Unlike ecore_evas_object_cursor_set and ecore_evas_object_cursor_device_set,
ecore_evas_cursor_set uses Ecore_Evas *ee before calling internal function which
internally checks null ptr dereference of Ecore_Evas *ee.

Change-Id: I555fc1e5c4c1c0ff3e6418996b7e144eb42f0b7f

src/lib/ecore_evas/ecore_evas.c

index 1101108..842dcb4 100644 (file)
@@ -1926,6 +1926,9 @@ ecore_evas_cursor_set(Ecore_Evas *ee, const char *file,
                       int layer, int hot_x, int hot_y)
 {
    Evas_Object *obj = NULL;
+
+   ECORE_EVAS_CHECk(ee);
+
    if (file)
      {
         int x, y;