[gimp] Bug 760029: PSD loader fails to load files with...



commit e79632728d8a5a3c5af1130de64f6c835ed2b769
Author: Massimo Valentini <mvalentini src gnome org>
Date:   Mon Jan 4 12:55:58 2016 +0100

    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

 plug-ins/file-psd/psd-load.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index e4477ad..98e25ff 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -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;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]