From: Carsten Haitzler (Rasterman) Date: Thu, 9 Jan 2014 06:04:46 +0000 (+0900) Subject: fix alloc to use right sizeof type in elm_image X-Git-Tag: v1.9.0-alpha1~280 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1b7bbde23e7a609c71a11095fd961b32ea766737;p=platform%2Fupstream%2Felementary.git fix alloc to use right sizeof type in elm_image this should fix CID 1132738 - not a real issue as it still was * 4 but more obvious and clean after fix --- diff --git a/src/lib/elm_image.c b/src/lib/elm_image.c index 9ec715349..8b710ec00 100644 --- a/src/lib/elm_image.c +++ b/src/lib/elm_image.c @@ -1368,9 +1368,9 @@ _elm_image_smart_orient_set(Eo *obj, void *_pd, va_list *list) * 270 degree */ data = evas_object_image_data_get(sd->img, EINA_FALSE); if (!data) return; - data2 = malloc(sizeof(unsigned char) * (iw * ih * 4)); + data2 = malloc(sizeof(unsigned int) * (iw * ih)); if (!data2) return; - memcpy(data2, data, sizeof (unsigned char) * (iw * ih * 4)); + memcpy(data2, data, sizeof(unsigned int) * (iw * ih)); w = ih; ih = iw;