[gimp/gimp-2-8] Bug 701189: Opening fuzzed .gif-file leads to crash of...



commit dbea8d7ba1e2e0361ef71a1d6bf6044d374cea5b
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Sat Feb 8 17:10:00 2014 +0100

    Bug 701189: Opening fuzzed .gif-file leads to crash of...
    
    graphic interface of Linux
    (cherry picked from commit bfd8d002826aaee0686395fd50ea5b9823211612)

 plug-ins/common/file-gif-load.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/file-gif-load.c b/plug-ins/common/file-gif-load.c
index c1ea2a0..547b975 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -732,7 +732,7 @@ LZWReadByte (FILE *fd,
 
   if (just_reset_LZW)
     {
-      if (input_code_size > MAX_LZW_BITS)
+      if (input_code_size > MAX_LZW_BITS || input_code_size <= 1)
         {
           g_message ("Value out of range for code size (corrupted file?)");
           return -1;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]