[gimp] More input validation in the psd load plugin



commit 5111498e1139147398a4efdfb02672a95d4e855d
Author: Simon Budig <simon budig de>
Date:   Thu Oct 28 20:26:50 2010 +0200

    More input validation in the psd load plugin
    
    plug-ins/file-psd/psd-load.c: Avoid dereferencing a random pointer
    on chn_a[cidx].data[i] when comp_mode is unrecognized.
    Spotted by Mikael Magnusson <mikachu gmail com>.

 plug-ins/file-psd/psd-load.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/plug-ins/file-psd/psd-load.c b/plug-ins/file-psd/psd-load.c
index 7f018de..edfd30b 100644
--- a/plug-ins/file-psd/psd-load.c
+++ b/plug-ins/file-psd/psd-load.c
@@ -1546,6 +1546,7 @@ add_merged_image (const gint32  image_id,
 
           case PSD_COMP_ZIP:                 /* ? */
           case PSD_COMP_ZIP_PRED:
+          default:
             g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
                         _("Unsupported compression mode: %d"), comp_mode);
             return -1;



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