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 6b26d7d commit 742fb2aCopy full SHA for 742fb2a
graalpython/com.oracle.graal.python.cext/src/memoryobject.c
@@ -150,6 +150,11 @@ void PyTruffle_ReleaseBuffer(Py_buffer* buffer) {
150
151
PyObject* PyMemoryView_FromBuffer(Py_buffer *buffer) {
152
Py_ssize_t ndim = buffer->ndim;
153
+ if (buffer->buf == NULL) {
154
+ PyErr_SetString(PyExc_ValueError,
155
+ "PyMemoryView_FromBuffer(): info->buf must not be NULL");
156
+ return NULL;
157
+ }
158
return polyglot_invoke(PY_TRUFFLE_CEXT, "PyTruffle_MemoryViewFromBuffer",
159
NULL,
160
0 commit comments