Skip to content

Commit 30cfdbf

Browse files
committed
fix sizeof signed compare
1 parent 60f6e5b commit 30cfdbf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/arraymodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ enum machine_format_code {
154154
static inline bool
155155
arraydata_size_valid(Py_ssize_t size, int itemsize)
156156
{
157-
return size <= (PY_SSIZE_T_MAX - sizeof(arraydata)) / itemsize;
157+
return size <= (PY_SSIZE_T_MAX - (Py_ssize_t)sizeof(arraydata)) / itemsize;
158158
}
159159

160160
static arraydata *

0 commit comments

Comments
 (0)