mirror of https://github.com/GNOME/gimp.git
plug-ins: PSD color block can have a non zero length even when mode is RGB.
Not taking a non zero length into consideration caused us to read from the wrong location in certain cases and then fail loading. Always use the specified length to go to the correct location. This is not a guarantee that we will be able to correctly load the image but at least we won't read wrong data from the wrong location.
This commit is contained in:
parent
666ae4ecfe
commit
3d248dc66f
|
@ -457,6 +457,15 @@ read_color_mode_block (PSDimage *img_a,
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Apparently it's possible to have a non zero block_len here. */
|
||||
if (! psd_seek (input, block_len, G_SEEK_CUR, error))
|
||||
{
|
||||
psd_set_error (error);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Create color map for bitmap image */
|
||||
if (img_a->color_mode == PSD_BITMAP)
|
||||
|
|
Loading…
Reference in New Issue