Added guard on params with no length on callproc

This commit is contained in:
Daniele Varrazzo 2014-06-05 01:32:58 +02:00
parent e53c738fec
commit 61696b0603

View File

@ -1042,9 +1042,8 @@ psyco_curs_callproc(cursorObject *self, PyObject *args)
} }
if (parameters != Py_None) { if (parameters != Py_None) {
nparameters = PyObject_Length(parameters); if (-1 == (nparameters = PyObject_Length(parameters))) {
if (nparameters < 0) { goto exit;
nparameters = 0;
} }
} }