[gdk-pixbuf] bmp: Fix reading of MS AMCap2 generated files



commit 3c9c6b0c8330ebbd1b9557b9fc3c68020dc394b5
Author: Bastien Nocera <hadess hadess net>
Date:   Sun Oct 26 12:08:21 2014 +0100

    bmp: Fix reading of MS AMCap2 generated files
    
    Remove bogus number of colours check. I could not find any BMP readers
    that used this sort of checks and removing it makes MS AMCap2 generated
    files load properly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=694950

 gdk-pixbuf/io-bmp.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
---
diff --git a/gdk-pixbuf/io-bmp.c b/gdk-pixbuf/io-bmp.c
index a979a1e..1f197e8 100644
--- a/gdk-pixbuf/io-bmp.c
+++ b/gdk-pixbuf/io-bmp.c
@@ -327,15 +327,6 @@ static gboolean DecodeHeader(unsigned char *BFH, unsigned char *BIH,
                State->Header.n_colors = clrUsed;
        else
             State->Header.n_colors = (1 << State->Header.depth);
-       
-       if (State->Header.n_colors > (1 << State->Header.depth)) {
-               g_set_error_literal (error,
-                                     GDK_PIXBUF_ERROR,
-                                     GDK_PIXBUF_ERROR_CORRUPT_IMAGE,
-                                     _("BMP image has bogus header data"));
-               State->read_state = READ_STATE_ERROR;
-               return FALSE;
-       }
 
        State->Type = State->Header.depth;      /* This may be less trivial someday */
 


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