diff --git a/NEWS b/NEWS index 79d88d6b..cbeea5e0 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ What's new in psycopg 2.5.3 Chris Withers (:ticket:`#193`). - Avoid blocking async connections on connect (:ticket:`#194`). Thanks to Adam Petrovich for the bug report and diagnosis. +- Fixed unsafe access to object names causing assertion failures in + Python 3 debug builds (:ticket:`#188`). - Fixed handling of dsn and closed attributes in connection subclasses failing to connect (from :ticket:`#192` discussion). - Fixed overflow opening a lobject with an oid not fitting in a signed int diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c index f6d8f8bf..86709657 100644 --- a/psycopg/pqpath.c +++ b/psycopg/pqpath.c @@ -1134,9 +1134,8 @@ _pq_fetch_tuples(cursorObject *curs) cast = psyco_default_cast; } - Dprintf("_pq_fetch_tuples: using cast at %p (%s) for type %d", - cast, Bytes_AS_STRING(((typecastObject*)cast)->name), - PQftype(curs->pgres,i)); + Dprintf("_pq_fetch_tuples: using cast at %p for type %d", + cast, PQftype(curs->pgres,i)); Py_INCREF(cast); PyTuple_SET_ITEM(casts, i, cast);