mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Fixed under-allocation (closes: #110)
This commit is contained in:
parent
fb0b523586
commit
9577f4e2a6
|
@ -1,5 +1,9 @@
|
|||
2006-06-11 Federico Di Gregorio <fog@initd.org>
|
||||
|
||||
* Applied patch from wkv to avoid under-allocating query
|
||||
space when the parameters are not of the right type
|
||||
(Closes: #110).
|
||||
|
||||
* Applied patch from wkv to avoid off by one allocation of
|
||||
connection encoding string (Closes: #109).
|
||||
|
||||
|
|
|
@ -891,6 +891,7 @@ psyco_curs_callproc(cursorObject *self, PyObject *args, PyObject *kwargs)
|
|||
|
||||
if(parameters && parameters != Py_None) {
|
||||
nparameters = PyObject_Length(parameters);
|
||||
if (nparameters < 0) nparameters = 0;
|
||||
}
|
||||
|
||||
/* allocate some memory, build the SQL and create a PyString from it */
|
||||
|
|
Loading…
Reference in New Issue
Block a user