raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=d72815747a62979e54622a76fd6c4648593df0ce

commit d72815747a62979e54622a76fd6c4648593df0ce
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sun Feb 12 16:20:24 2017 +0900

    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
---
 src/bin/efx/efx_fade.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/bin/efx/efx_fade.c b/src/bin/efx/efx_fade.c
index c03807b..80f7b16 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;

-- 


Reply via email to