Skip to content

Commit 4be5b8a

Browse files
authored
Use unsigned long for DWORD (#9352)
1 parent e85700f commit 4be5b8a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/libImaging/FliDecode.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818

1919
#define I16(ptr) ((ptr)[0] + ((int)(ptr)[1] << 8))
2020

21-
#define I32(ptr) \
22-
((ptr)[0] + ((INT32)(ptr)[1] << 8) + ((INT32)(ptr)[2] << 16) + \
23-
((INT32)(ptr)[3] << 24))
21+
#define I32(ptr) \
22+
((ptr)[0] + ((unsigned long)(ptr)[1] << 8) + ((unsigned long)(ptr)[2] << 16) + \
23+
((unsigned long)(ptr)[3] << 24))
2424

2525
#define ERR_IF_DATA_OOB(offset) \
2626
if ((data + (offset)) > ptr + bytes) { \
@@ -31,8 +31,8 @@
3131
int
3232
ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8 *buf, Py_ssize_t bytes) {
3333
UINT8 *ptr;
34-
int framesize;
35-
int c, chunks, advance;
34+
unsigned long framesize, advance;
35+
int c, chunks;
3636
int l, lines;
3737
int i, j, x = 0, y, ymax;
3838

0 commit comments

Comments
 (0)