image - null checking.
authorChunEon Park <hermet@hermet.pe.kr>
Wed, 21 May 2014 04:24:32 +0000 (13:24 +0900)
committerChunEon Park <hermet@hermet.pe.kr>
Wed, 21 May 2014 04:24:32 +0000 (13:24 +0900)
If the rotated image exceeds image maximum size, the data would be invalid.

legacy/elementary/src/lib/elm_image.c

index 306c21a..ac90ce8 100644 (file)
@@ -1106,6 +1106,11 @@ _elm_image_orient_set(Eo *obj, Elm_Image_Data *sd, Elm_Image_Orient orient)
 
    evas_object_image_size_set(sd->img, iw, ih);
    data = evas_object_image_data_get(sd->img, EINA_TRUE);
+   if (!data)
+     {
+        free(data2);
+        return;
+     }
 
    switch (orient)
      {