We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd7ec1 commit b8bdb13Copy full SHA for b8bdb13
Modules/arraymodule.c
@@ -154,6 +154,7 @@ enum machine_format_code {
154
static arraydata *
155
arraydata_alloc(Py_ssize_t size, int itemsize)
156
{
157
+ assert (size <= PY_SSIZE_T_MAX / itemsize);
158
Py_ssize_t bufsize = sizeof(arraydata) + size * itemsize;
159
arraydata *data = (arraydata *)PyMem_Malloc(bufsize);
160
if (data == NULL) {
0 commit comments