Library
-------
+- Issue #27897: Fixed possible crash in sqlite3.Connection.create_collation()
+ if pass invalid string-like object as a name. Original patch by Xiang Zhang.
+
- Issue #1703178: Fix the ability to pass the --link-objects option to the
distutils build_ext command.
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)) {
goto finally;
}
- uppercase_name = PyObject_CallMethod(name, "upper", "");
+ uppercase_name = PyObject_CallMethod((PyObject *)&PyString_Type,
+ "upper", "O", name);
if (!uppercase_name) {
goto finally;
}
- chk = PyString_AsString(uppercase_name);
+ chk = PyString_AS_STRING(uppercase_name);
while (*chk) {
if ((*chk >= '0' && *chk <= '9')
|| (*chk >= 'A' && *chk <= 'Z')