Use PyOS_snprintf instead of sprintf.

This commit is contained in:
Jeremy Hylton 2001-11-28 20:42:20 +00:00
parent ef58b31991
commit 518ab1c02a
13 changed files with 45 additions and 39 deletions

View file

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