HomePhabricator

evas: Prevent crash with image_data_get

Authored by Jean-Philippe Andre <jp.andre@samsung.com> on Oct 18 2017, 5:40 AM.

Description

evas: Prevent crash with image_data_get

If the image has no data, it may get an allocated surface of 1x1 but it
is not sane to return the pointer to that data, as the user would expect
a normally sized image (in my case, 1920x1080).

I do not fully understand what is going on with this image. But at least
this transforms a crash into a simple ERR in ~/.xessions-errors

Two similar crashes happened:

  • SIGSEGV by writing data outside of the image data
  • abort() in free() because the malloc metadata has been overridden when writing outside of the image data (newly allocated 1x1).

Fixes T5957

@fix

Details

Committed
rasterNov 7 2017, 1:30 AM
Parents
rEFL3850a903e4d1: elm_scroller: fix scrolling with key move
Branches
Unknown
Tags
Unknown
Tasks
T5957: E segfault when opening virtualbox console