Bug 760029: PSD loader fails to load files with...

... adjustment or fill layers

the length of the compressed channel data was truncated
for the wrong type used in read_channel_data signature
This commit is contained in:
Massimo Valentini 2016-01-04 12:55:58 +01:00
parent ccd6e31673
commit e79632728d
1 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,7 @@ static gint read_channel_data (PSDchannel *channel,
guint16 compression,
const guint16 *rle_pack_len,
FILE *f,
guint16 comp_len,
guint32 comp_len,
GError **error);
static void convert_1_bit (const gchar *src,
@ -2000,7 +2000,7 @@ read_channel_data (PSDchannel *channel,
guint16 compression,
const guint16 *rle_pack_len,
FILE *f,
guint16 comp_len,
guint32 comp_len,
GError **error)
{
gchar *raw_data;
@ -2090,7 +2090,8 @@ read_channel_data (PSDchannel *channel,
}
else
{
psd_set_error (feof (f), errno, error);
g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
_("Failed to decompress data"));
g_free (src);
return -1;
}