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 be7cace74e
)
This commit is contained in:
@ -627,8 +627,8 @@ typedef struct
|
|||||||
gchar type[4]; /* Image resource type */
|
gchar type[4]; /* Image resource type */
|
||||||
gint16 id; /* Image resource ID */
|
gint16 id; /* Image resource ID */
|
||||||
gchar name[256]; /* Image resource name (pascal string) */
|
gchar name[256]; /* Image resource name (pascal string) */
|
||||||
gint32 data_start; /* Image resource data start */
|
guint32 data_start; /* Image resource data start */
|
||||||
gint32 data_len; /* Image resource data length */
|
guint32 data_len; /* Image resource data length */
|
||||||
} PSDimageres;
|
} PSDimageres;
|
||||||
|
|
||||||
/* PSD Layer Resource data structure */
|
/* PSD Layer Resource data structure */
|
||||||
@ -636,8 +636,8 @@ typedef struct
|
|||||||
{
|
{
|
||||||
gchar sig[4]; /* Layer resource signature */
|
gchar sig[4]; /* Layer resource signature */
|
||||||
gchar key[4]; /* Layer resource key */
|
gchar key[4]; /* Layer resource key */
|
||||||
gint32 data_start; /* Layer resource data start */
|
guint32 data_start; /* Layer resource data start */
|
||||||
gint32 data_len; /* Layer resource data length */
|
guint32 data_len; /* Layer resource data length */
|
||||||
} PSDlayerres;
|
} PSDlayerres;
|
||||||
|
|
||||||
/* PSD File data structures */
|
/* PSD File data structures */
|
||||||
|
Reference in New Issue
Block a user