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



commit bfd8d002826aaee0686395fd50ea5b9823211612
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

 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 485f79f..d71e984 100644
--- a/plug-ins/common/file-gif-load.c
+++ b/plug-ins/common/file-gif-load.c
@@ -733,7 +733,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]