mirror of https://github.com/GNOME/gimp.git
plug-ins: Fix rounding error in PCX load
Some valid PCX/DCX files wouldn't load because the bytes per line header check can be off by one due to integer division rounding. This adds 1 to the equation to account for this.
This commit is contained in:
parent
7bc7273d04
commit
da217088d0
|
@ -713,7 +713,7 @@ load_image (GimpProcedure *procedure,
|
|||
fclose (fd);
|
||||
return NULL;
|
||||
}
|
||||
if (bytesperline < ((width * pcx_header.bpp + 7) / 8))
|
||||
if ((bytesperline + 1) < ((width * pcx_header.bpp + 7) / 8))
|
||||
{
|
||||
g_message (_("Invalid number of bytes per line in PCX header"));
|
||||
fclose (fd);
|
||||
|
|
Loading…
Reference in New Issue