summaryrefslogtreecommitdiff
path: root/src/lib/emile
diff options
context:
space:
mode:
authorSungtaek Hong <sth253.hong@samsung.com>2016-12-07 13:42:46 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-12-07 13:42:46 +0900
commit44716502fce64a73d17eb443c51dadbd2c6dcfae (patch)
tree38f0e109747749fad2e619ee190d2649c81fbfef /src/lib/emile
parent68470a50fe5483c06924e41488679f1e9bd93565 (diff)
emile_image: fix possible segmentation fault in AGRY88
Summary: - ptrag is set NULL and is allocated only when prop is rotated. but *ptrag = 0xFF00 | ptr[0]; without checking rotation. Reviewers: jpeg, cedric, Hermet Reviewed By: Hermet Subscribers: conr2d Differential Revision: https://phab.enlightenment.org/D4463
Diffstat (limited to 'src/lib/emile')
-rw-r--r--src/lib/emile/emile_image.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 59af9b475c..e04df4c1af 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -1860,10 +1860,11 @@ _emile_jpeg_data(Emile_Image *image,
1860 else 1860 else
1861 { 1861 {
1862 ptr2 = pixels; 1862 ptr2 = pixels;
1863 ptrag = pixels;
1863 ptrg = pixels; 1864 ptrg = pixels;
1864 } 1865 }
1865 1866
1866 if (!ptr2 && !ptrg) 1867 if (!ptr2 && !ptrag && !ptrg)
1867 { 1868 {
1868 *error = EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; 1869 *error = EMILE_IMAGE_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED;
1869 goto on_error; 1870 goto on_error;