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)
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 c03807b49..80f7b16de 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
130{ 130{
131 E_EFX *e; 131 E_EFX *e;
132 E_Efx_Fade_Data *efd; 132 E_Efx_Fade_Data *efd;
133 int r, g, b, a;
133 134
134 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE); 135 EINA_SAFETY_ON_NULL_RETURN_VAL(obj, EINA_FALSE);
135 e = evas_object_data_get(obj, "e_efx-data"); 136 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
152 efd->alpha[1] = alpha; 153 efd->alpha[1] = alpha;
153 efd->cb = cb; 154 efd->cb = cb;
154 efd->data = (void*)data; 155 efd->data = (void*)data;
155 evas_object_color_get(efd->clip, (int*)&efd->start.r, (int*)&efd->start.g, (int*)&efd->start.b, (int*)&alpha); 156 evas_object_color_get(efd->clip, &r, &g, &b, &a);
156 efd->alpha[0] = (unsigned char)alpha; 157 efd->start.r = r;
158 efd->start.g = g;
159 efd->start.b = b;
160 efd->alpha[0] = a;
157 if (ec) 161 if (ec)
158 { 162 {
159 efd->color.r = ec->r; 163 efd->color.r = ec->r;