From 39db00b89ee791f34ff9115bd596ddcc64692085 Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Tue, 22 Jan 2008 13:15:55 +0000 Subject: [PATCH] corrected check of the bytesperline field which caused monochrome PCX 2008-01-22 Sven Neumann * plug-ins/common/pcx.c: corrected check of the bytesperline field which caused monochrome PCX images to be rejected (bug #510658). svn path=/trunk/; revision=24670 --- ChangeLog | 5 +++++ plug-ins/common/pcx.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ad227194c7..3160b72369 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-01-22 Sven Neumann + + * plug-ins/common/pcx.c: corrected check of the bytesperline field + which caused monochrome PCX images to be rejected (bug #510658). + 2008-01-22 Sven Neumann * app/core/gimp.[ch]: added new function gimp_use_gegl(). diff --git a/plug-ins/common/pcx.c b/plug-ins/common/pcx.c index a9d1d7b0fe..7fd2ce0596 100644 --- a/plug-ins/common/pcx.c +++ b/plug-ins/common/pcx.c @@ -381,7 +381,7 @@ load_image (const gchar *filename) g_message (_("Unsupported or invalid image height: %d"), height); return -1; } - if (bytesperline < width) + if (bytesperline < (width * pcx_header.bpp) / 8) { g_message (_("Invalid number of bytes per line in PCX header")); return -1;