summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/_bsddb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 3a67a1e..9e31029 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -312,6 +312,10 @@ static Py_buffer * _malloc_view(PyObject *obj)
"Py_buffer malloc failed");
return NULL;
}
+
+ if (PyObject_GetBuffer(obj, view, PyBUF_SIMPLE))
+ return NULL;
+
if (view->ndim > 1) {
PyErr_SetString(PyExc_BufferError,
"buffers must be single dimension");