hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=44716502fce64a73d17eb443c51dadbd2c6dcfae

commit 44716502fce64a73d17eb443c51dadbd2c6dcfae
Author: Sungtaek Hong <sth253.h...@samsung.com>
Date:   Wed Dec 7 13:42:46 2016 +0900

    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
---
 src/lib/emile/emile_image.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 59af9b4..e04df4c 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,
    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;

-- 


Reply via email to