2008-03-07 Jason Erickson <jerickso@stickpeople.com>

* psycopg/psycopgmodule.c (psyco_connect): fix off by one error in
	calculating the length of the DSN.
This commit is contained in:
James Henstridge 2008-03-06 16:15:41 +00:00
parent e55e2683cf
commit 89cadcb553
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-03-07 Jason Erickson <jerickso@stickpeople.com>
* psycopg/psycopgmodule.c (psyco_connect): fix off by one error in
calculating the length of the DSN.
2008-03-07 James Henstridge <james@jamesh.id.au>
* psycopg/pqpath.c (_pq_fetch_tuples): Don't call Python APIs

View File

@ -144,7 +144,7 @@ psyco_connect(PyObject *self, PyObject *args, PyObject *keywds)
PyOS_snprintf(port, 16, "%d", iport);
if (dsn_static == NULL) {
size_t l = 45; /* len("dbname= user= password= host= port= sslmode=\0") */
size_t l = 46; /* len(" dbname= user= password= host= port= sslmode=\0") */
if (database) l += strlen(database);
if (host) l += strlen(host);