-
-
Notifications
You must be signed in to change notification settings - Fork 107
Closed
Description
if (!PyBuffer_IsContiguous(&dest, 'C') || dest.ndim > 1) {
PyErr_SetString(PyExc_ValueError,
"destination buffer should be contiguous and have at most one dimension");
goto finally;
}In PyArg_ParseTuple*() functions, the first condition has been checked.
w*:
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1251
y*:
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L857
https://github.com/python/cpython/blob/v3.5.0/Python/getargs.c#L1306
The second condition is rare, even in Python's Argument Clinic, it is not checked for bytes-like object:
https://github.com/python/cpython/blob/3.9/Modules/clinic/_lzmamodule.c.h#L28-L34
Metadata
Metadata
Assignees
Labels
No labels