[gimp] plug-ins: in file-psd, make offset/size fields unsigned



commit be7cace74ebb2ee6e8d76d12e091924e3cfa709f
Author: Ell <ell_se yahoo com>
Date:   Fri Feb 28 00:35:35 2020 +0200

    plug-ins: in file-psd, make offset/size fields unsigned
    
    In file-psd, make the data_start and data_len fields of the
    PSDimageres and PSDlayerres structs unsigned, to avoid potential
    overflow/sign-extension.

 plug-ins/file-psd/psd.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/plug-ins/file-psd/psd.h b/plug-ins/file-psd/psd.h
index c185bc3207..0bd91e4533 100644
--- a/plug-ins/file-psd/psd.h
+++ b/plug-ins/file-psd/psd.h
@@ -627,8 +627,8 @@ typedef struct
   gchar         type[4];                /* Image resource type */
   gint16        id;                     /* Image resource ID */
   gchar         name[256];              /* Image resource name (pascal string) */
-  gint32        data_start;             /* Image resource data start */
-  gint32        data_len;               /* Image resource data length */
+  guint32       data_start;             /* Image resource data start */
+  guint32       data_len;               /* Image resource data length */
 } PSDimageres;
 
 /* PSD Layer Resource data structure */
@@ -636,8 +636,8 @@ typedef struct
 {
   gchar         sig[4];                 /* Layer resource signature */
   gchar         key[4];                 /* Layer resource key */
-  gint32        data_start;             /* Layer resource data start */
-  gint32        data_len;               /* Layer resource data length */
+  guint32       data_start;             /* Layer resource data start */
+  guint32       data_len;               /* Layer resource data length */
 } PSDlayerres;
 
 /* PSD File data structures */


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