summaryrefslogtreecommitdiffstats
path: root/Modules/_bsddb.c
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-06-10 16:43:26 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-06-10 16:43:26 (GMT)
commit250788453fa64adef423b4f5b0294922c91a4c46 (patch)
tree6f6f9790c50278005bf58e8533f5e854bc837178 /Modules/_bsddb.c
parent0c77a82c3d3342affd157f3693812c789a8d6ae1 (diff)
downloadcpython-250788453fa64adef423b4f5b0294922c91a4c46.zip
cpython-250788453fa64adef423b4f5b0294922c91a4c46.tar.gz
cpython-250788453fa64adef423b4f5b0294922c91a4c46.tar.bz2
Fixed _bsddb key allocation errors.
Diffstat (limited to 'Modules/_bsddb.c')
-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");