summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-12 16:20:24 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2017-02-12 16:25:35 +0900
commitd72815747a62979e54622a76fd6c4648593df0ce (patch)
tree308345be455c5b8488a140112371fc43bd0477cd
parent898a057509ba7f96218969b4dbc8fcbc1a68c405 (diff)
downloadenlightenment-d72815747a62979e54622a76fd6c4648593df0ce.tar.gz
efx - fix unaligned ptr fill that is actually a bug
warning found a bug - filling in chr fileds with an api that expects ptrs to ints - this is doing really bad things like unaligned writes and it's overiting adjacent memory. fix
-rw-r--r--src/bin/efx/efx_fade.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bin/efx/efx_fade.c b/src/bin/efx/efx_fade.c
index c03807b497..80f7b16de8 100644
--- a/src/bin/efx/efx_fade.c
+++ b/src/bin/efx/efx_fade.c
@@ -130,6 +130,7 @@ e_efx_fade(Evas_Object *obj, E_Efx_Effect_Speed speed, E_Efx_Color *ec, unsigned
{
E_EFX *e;
E_Efx_Fade_Data *efd;
+ int r, g, b, a;
EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
e = evas_object_data_get(obj, "e_efx-data");
@@ -152,8 +153,11 @@ e_efx_fade(Evas_Object *obj, E_Efx_Effect_Speed speed, E_Efx_Color *ec, unsigned
efd->alpha[1] = alpha;
efd->cb = cb;
efd->data = (void*)data;
- evas_object_color_get(efd->clip, (int*)&efd->start.r, (int*)&efd->start.g, (int*)&efd->start.b, (int*)&alpha);
- efd->alpha[0] = (unsigned char)alpha;
+ evas_object_color_get(efd->clip, &r, &g, &b, &a);
+ efd->start.r = r;
+ efd->start.g = g;
+ efd->start.b = b;
+ efd->alpha[0] = a;
if (ec)
{
efd->color.r = ec->r;