mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Skip Montanaro: add string precisions to calls to PyErr_Format
to prevent possible buffer overruns.
This commit is contained in:
parent
fa972c987c
commit
5db862dd0c
5 changed files with 29 additions and 27 deletions
|
@ -2513,7 +2513,7 @@ call_function(func, arg, kw)
|
|||
else {
|
||||
if (!PyFunction_Check(func)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"call of non-function (type %s)",
|
||||
"call of non-function (type %.200s)",
|
||||
func->ob_type->tp_name);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue