mirror of
https://github.com/python/cpython.git
synced 2025-09-04 07:51:13 +00:00
Use PyOS_snprintf instead of sprintf.
This commit is contained in:
parent
ef58b31991
commit
518ab1c02a
13 changed files with 45 additions and 39 deletions
|
@ -779,7 +779,7 @@ builtin_map(PyObject *self, PyObject *args)
|
|||
static char errmsg[] =
|
||||
"argument %d to map() must support iteration";
|
||||
char errbuf[sizeof(errmsg) + 25];
|
||||
sprintf(errbuf, errmsg, i+2);
|
||||
PyOS_snprintf(errbuf, sizeof(errbuf), errmsg, i+2);
|
||||
PyErr_SetString(PyExc_TypeError, errbuf);
|
||||
goto Fail_2;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue