Skip Montanaro: add string precisions to calls to PyErr_Format

to prevent possible buffer overruns.
This commit is contained in:
Guido van Rossum 2000-04-10 12:46:51 +00:00
parent fa972c987c
commit 5db862dd0c
5 changed files with 29 additions and 27 deletions

View file

@ -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;
}