Use unsigned long for DWORD (#9352)

This commit is contained in:
Andrew Murray 2025-12-28 07:34:57 +11:00 committed by GitHub
parent e85700fe48
commit 4be5b8a2fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,9 +18,9 @@
#define I16(ptr) ((ptr)[0] + ((int)(ptr)[1] << 8))
#define I32(ptr) \
((ptr)[0] + ((INT32)(ptr)[1] << 8) + ((INT32)(ptr)[2] << 16) + \
((INT32)(ptr)[3] << 24))
#define I32(ptr) \
((ptr)[0] + ((unsigned long)(ptr)[1] << 8) + ((unsigned long)(ptr)[2] << 16) + \
((unsigned long)(ptr)[3] << 24))
#define ERR_IF_DATA_OOB(offset) \
if ((data + (offset)) > ptr + bytes) { \
@ -31,8 +31,8 @@
int
ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t bytes) {
UINT8 *ptr;
int framesize;
int c, chunks, advance;
unsigned long framesize, advance;
int c, chunks;
int l, lines;
int i, j, x = 0, y, ymax;