Kaydet (Commit) ea1cf870 authored tarafından Xiang Zhang's avatar Xiang Zhang

Issue #29044: Fix a use-after-free in string '%c' formatter.

üst c67983b8
......@@ -14213,11 +14213,12 @@ formatchar(PyObject *v)
if (iobj == NULL) {
goto onError;
}
v = iobj;
x = PyLong_AsLong(iobj);
Py_DECREF(iobj);
}
/* Integer input truncated to a character */
x = PyLong_AsLong(v);
else {
x = PyLong_AsLong(v);
}
if (x == -1 && PyErr_Occurred())
goto onError;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment