mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Check failed list creation in array adaptation
This commit is contained in:
parent
be35df3818
commit
6cece00958
|
@ -260,7 +260,7 @@ typecast_GENERIC_ARRAY_cast(const char *str, Py_ssize_t len, PyObject *curs)
|
|||
Dprintf("typecast_GENERIC_ARRAY_cast: str = '%s',"
|
||||
" len = " FORMAT_CODE_PY_SSIZE_T, str, len);
|
||||
|
||||
obj = PyList_New(0);
|
||||
if (!(obj = PyList_New(0))) { return NULL; }
|
||||
|
||||
/* scan the array skipping the first level of {} */
|
||||
if (typecast_array_scan(&str[1], len-2, curs, base, obj) < 0) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user