From 44d0c6312946f36847d85ccf63b55ac7165b275a Mon Sep 17 00:00:00 2001 From: Ell Date: Fri, 28 Feb 2020 00:35:35 +0200 Subject: [PATCH] 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. (cherry picked from commit be7cace74ebb2ee6e8d76d12e091924e3cfa709f) --- 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 724609dd09..b470686ef8 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 */