mirror of https://github.com/GNOME/gimp.git
plug-ins: fix #12500 End of file error loading PSD file
The block size for layer info should be a multiple of 2. We had erroneously thought it was a multiple of 4, based on what is used for layer resources. But of course Photoshop is inconsistent and uses a multiple of 2 here.
This commit is contained in:
parent
91203b76cb
commit
d1e20e5e31
|
@ -1374,8 +1374,8 @@ read_layer_block (PSDimage *img_a,
|
|||
/* To make computations easier add the size of block_len */
|
||||
block_len += block_len_size;
|
||||
|
||||
/* Actual block size is a multiple of 4 */
|
||||
adjusted_block_len = (block_len + 3) / 4 * 4;
|
||||
/* Actual block size is a multiple of 2 */
|
||||
adjusted_block_len = (block_len + 1) / 2 * 2;
|
||||
|
||||
if (block_len > block_len_size)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue