kwo pushed a commit to branch master.

http://git.enlightenment.org/legacy/imlib2.git/commit/?id=5b5544ab7716b1912954092fe031331cdc1df9d3

commit 5b5544ab7716b1912954092fe031331cdc1df9d3
Author: Kim Woelders <k...@woelders.dk>
Date:   Thu Apr 7 16:32:34 2016 +0200

    Revert "gif: fix oob reads w/bad colormaps"
    
    This reverts commit 16de244bd03d2f75da6508feb1ad9cb4e668e9dc.
    
    Will push alternative solution.
---
 src/modules/loaders/loader_gif.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/modules/loaders/loader_gif.c b/src/modules/loaders/loader_gif.c
index 7bdf29c..638df59 100644
--- a/src/modules/loaders/loader_gif.c
+++ b/src/modules/loaders/loader_gif.c
@@ -170,16 +170,9 @@ load(ImlibImage * im, ImlibProgressFunction progress, char 
progress_granularity,
                     }
                   else
                     {
-                       if (rows[i][j] < cmap->ColorCount)
-                         {
-                            r = cmap->Colors[rows[i][j]].Red;
-                            g = cmap->Colors[rows[i][j]].Green;
-                            b = cmap->Colors[rows[i][j]].Blue;
-                         }
-                       else
-                         {
-                            r = g = b = 0;
-                         }
+                       r = cmap->Colors[rows[i][j]].Red;
+                       g = cmap->Colors[rows[i][j]].Green;
+                       b = cmap->Colors[rows[i][j]].Blue;
                        *ptr++ = (0xff << 24) | (r << 16) | (g << 8) | b;
                     }
                   per += per_inc;

-- 


Reply via email to