Skip to content

Commit dce6502

Browse files
author
Stefan Krah
authored
bpo-31279: Silence -Wstringop-overflow warning. (#3207)
1 parent 138753c commit dce6502

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/bytearrayobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ PyByteArray_Resize(PyObject *self, Py_ssize_t requested_size)
224224
return -1;
225225
}
226226
memcpy(sval, PyByteArray_AS_STRING(self),
227-
Py_MIN(requested_size, Py_SIZE(self)));
227+
Py_MIN((size_t)requested_size, (size_t)Py_SIZE(self)));
228228
PyObject_Free(obj->ob_bytes);
229229
}
230230
else {

0 commit comments

Comments
 (0)