forked from enlightenment/efl
edje - [Edje: Bug fix] NULL check is added before strcmp() in _edje_real_part_swallow() function
Hi, Can some one please verify and merge the attahed patch with open source svn Edje code. [Issue details :] NULL checking is not done before sending a string to strcmp(). In _edje_real_part_swallow() function of edje_util.c file, evas_object_type_get() API can return NULL and if this NULL value is directly passed to strcmp(), it causes a crash. [Issue fix :] NULL check is added for obj_type before passing it to strcmp(). Thanks & Regards, Sumanth Signed-Off-By: Sumanth Krishna (sumanth.m@samsung.com) SVN revision: 83393
This commit is contained in:
parent
c46b096c78
commit
8a7e99b67e
|
@ -385,3 +385,8 @@
|
|||
|
||||
* Ecore_Evas wayland-egl only renders now if last frame has
|
||||
been presented.
|
||||
|
||||
2013-01-29 Sumanth Krishna Mannam <sumanth.m@samsung.com>
|
||||
|
||||
* Prevent a crash even if an invalid object is swallowed into an
|
||||
edje object.
|
||||
|
|
1
NEWS
1
NEWS
|
@ -131,3 +131,4 @@ Fixes:
|
|||
* Fixed pixman surface alloc where allocated and image size differ.
|
||||
* Fixed x11 error sync issue with ecore_x_image_get()
|
||||
* Fix evas gif loader to return the correct frame duration
|
||||
* Prevent a crash even if an invalid object is swallowed into an edje object.
|
||||
|
|
|
@ -6401,6 +6401,8 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
|
|||
Evas_Object *obj_swallow,
|
||||
Eina_Bool hints_update)
|
||||
{
|
||||
const char *obj_type;
|
||||
|
||||
if ((rp->type != EDJE_RP_TYPE_SWALLOW) ||
|
||||
(!rp->typedata.swallow)) return;
|
||||
if (rp->typedata.swallow->swallowed_object)
|
||||
|
@ -6440,7 +6442,8 @@ _edje_real_part_swallow(Edje_Real_Part *rp,
|
|||
rp);
|
||||
|
||||
//If the map is enabled, uv should be updated when image size is changed.
|
||||
if (!strcmp(evas_object_type_get(rp->typedata.swallow->swallowed_object), "image"))
|
||||
obj_type = evas_object_type_get(rp->typedata.swallow->swallowed_object);
|
||||
if (obj_type && !strcmp(obj_type, "image"))
|
||||
evas_object_event_callback_add(obj_swallow, EVAS_CALLBACK_IMAGE_RESIZE,
|
||||
_edje_object_part_swallow_image_resize_cb,
|
||||
rp);
|
||||
|
|
Loading…
Reference in New Issue