mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Issue #6415: Fixed warnings.warn sagfault on bad formatted string.
This commit is contained in:
parent
66da2635ff
commit
e78e5d2e51
2 changed files with 15 additions and 0 deletions
|
@ -317,6 +317,8 @@ warn_explicit(PyObject *category, PyObject *message,
|
|||
}
|
||||
if (rc == 1) {
|
||||
text = PyObject_Str(message);
|
||||
if (text == NULL)
|
||||
goto cleanup;
|
||||
category = (PyObject*)message->ob_type;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue