
report at bugs
Jul 7, 2008, 6:16 AM
Post #1 of 2
(71 views)
Permalink
|
|
[issue3312] bugs in _sqlite module
|
|
New submission from STINNER Victor <haypo[at]users.sourceforge.net>: (A) module_register_adapter() doesn't check microprotocols_add() result, whereas it can fails (eg. dict setitem error). Example: "import _sqlite3; _sqlite3.register_adapter({}, None)" => should raise a TypeError (unhashable type: 'dict'). (B) Connection.set_isolation_level() tries to create the string "BEGIN "+isolation_level and the store it as PyString in begin_statement. But if the result can not be converted to string, Python crashs. Example: >>> import _sqlite3 >>> c=_sqlite3.Connection("a") >>> c.isolation_level = u"\xe9" Erreur de segmentation (core dumped) Attached patch fix the two bugs. ---------- components: Library (Lib) files: _sqlite.patch keywords: patch messages: 69387 nosy: haypo severity: normal status: open title: bugs in _sqlite module versions: Python 2.6 Added file: http://bugs.python.org/file10841/_sqlite.patch _______________________________________ Python tracker <report[at]bugs.python.org> <http://bugs.python.org/issue3312> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
|