From: Sungtaek Hong Date: Tue, 6 Dec 2016 13:28:35 +0000 (+0900) Subject: emile_image: fix possible segmentation fault in AGRY88 X-Git-Tag: accepted/tizen/common/20170102.152350~112 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f04546a166c0b37eef3bda664193dd982bb855e1;p=platform%2Fupstream%2Fefl.git emile_image: fix possible segmentation fault in AGRY88 - ptrag is set NULL and is allocated only when prop is rotated. but *ptrag = 0xFF00 | ptr[0]; without checking rotation. Change-Id: Iba00edc526588c074ad9629a808df03c512642c7 Signed-off-by: Sungtaek Hong --- diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c index 6ad97c5..f5d3318 100644 --- a/src/lib/emile/emile_image.c +++ b/src/lib/emile/emile_image.c @@ -1835,10 +1835,11 @@ _emile_jpeg_data(Emile_Image *image, else { ptr2 = pixels; + ptrag = pixels; ptrg = pixels; } - if (!ptr2 && !ptrg) + if (!ptr2 && !ptrag && !ptrg) { *error = EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; goto on_error;