[gimp/gimp-2-8] plug-ins: don't check biClrUsed if bpp > 8 (in bug 697431)



commit 76ee47eff95e8dfad303d473c8a54b15720c83c0
Author: Téo Mazars <teomazars gmail com>
Date:   Thu Jan 30 20:31:26 2014 +0100

    plug-ins: don't check biClrUsed if bpp > 8 (in bug 697431)
    
    (cherry picked from commit 54f83a5ba273e45a9184f13d1f4b0f5697d56555)

 plug-ins/file-bmp/bmp-read.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/file-bmp/bmp-read.c b/plug-ins/file-bmp/bmp-read.c
index e59dfb8..f088a48 100644
--- a/plug-ins/file-bmp/bmp-read.c
+++ b/plug-ins/file-bmp/bmp-read.c
@@ -487,7 +487,7 @@ ReadBMP (const gchar  *name,
       goto out;
     }
 
-  if (Bitmap_Head.biClrUsed > 256)
+  if (Bitmap_Head.biClrUsed > 256 && Bitmap_Head.biBitCnt <= 8)
     {
       g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                    _("'%s' is not a valid BMP file"),


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