efl: fix potential segv in Evas software engine native_set code.
authorCedric BAIL <cedric.bail@free.fr>
Thu, 13 Dec 2012 09:46:32 +0000 (09:46 +0000)
committerCedric BAIL <cedric.bail@free.fr>
Thu, 13 Dec 2012 09:46:32 +0000 (09:46 +0000)
SVN revision: 80805

ChangeLog
NEWS
src/modules/evas/engines/software_generic/evas_engine.c

index 74a6b65..d1ba56f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-13  Cedric Bail
+
+       * Fix potential segv in software engine native_set code.
+
 2012-12-12  Daniel Willmann
 
        * Fix possible buffer overflow in functions relying on EET_T_LAST.
diff --git a/NEWS b/NEWS
index 9de63b6..7d45502 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -78,3 +78,4 @@ Fixes:
     * Fix the gl line incorrect position drawing.
     * Fix possible buffer overflow in functions relying on EET_T_LAST
     * Fix possible memory corruption in xrandr EDID functions.
+    * Fix potential segv in software engine native_set code.
index 6dd2201..9efd35e 100644 (file)
@@ -578,21 +578,7 @@ eng_image_native_set(void *data EINA_UNUSED, void *image, void *native EINA_UNUS
    Evas_Native_Surface *ns = native;
    Image_Entry *im = image, *im2 = NULL;
 
-   if (!im)
-     {
-        if ((ns) && (ns->data.x11.visual))
-          {
-             im = evas_cache_image_data(evas_common_image_cache_get(),
-                                        im->w, im->h,
-                                        ns->data.x11.visual, 1,
-                                        EVAS_COLORSPACE_ARGB8888);
-             return im;
-          }
-        else
-           return NULL;
-     }
-
-   if ((!ns) && (!im)) return im;
+   if (!im || !ns) return im;
 
    if (!ns) return im;