cpython: 38e954a2a37e (original) (raw)
Mercurial > cpython
changeset 104212:38e954a2a37e 2.7
Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation() if pass invalid string-like object as a name. Original patch by Xiang Zhang. [#27897]
Serhiy Storchaka storchaka@gmail.com | |
---|---|
date | Sat, 01 Oct 2016 08:24:55 +0300 |
parents | ce57a74b5223 |
children | a8168a52a56f |
files | Misc/NEWS Modules/_sqlite/connection.c |
diffstat | 2 files changed, 8 insertions(+), 3 deletions(-)[+] [-] Misc/NEWS 3 Modules/_sqlite/connection.c 8 |
line wrap: on
line diff
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -44,6 +44,9 @@ Core and Builtins Library ------- +- Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
- Issue #1703178: Fix the ability to pass the --link-objects option to the distutils build_ext command.
--- a/Modules/_sqlite/connection.c +++ b/Modules/_sqlite/connection.c @@ -1476,16 +1476,18 @@ pysqlite_connection_create_collation(pys goto finally; }
- if (!PyArg_ParseTuple(args, "O!O:create_collation(name, callback)", &PyString_Type, &name, &callable)) {
- if (!PyArg_ParseTuple(args, "SO:create_collation(name, callback)",
}&name, &callable)) {[](#l2.9) goto finally;[](#l2.10)