mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Avoid sprintf buffer overflow if more than 9999 arguments.
This commit is contained in:
parent
04bc9d6e67
commit
15e33a4c42
1 changed files with 1 additions and 1 deletions
|
@ -658,7 +658,7 @@ builtin_map(self, args)
|
|||
if (! (sqp->sqf = sqp->seq->ob_type->tp_as_sequence)) {
|
||||
static char errmsg[] =
|
||||
"argument %d to map() must be a sequence object";
|
||||
char errbuf[sizeof(errmsg) + 3];
|
||||
char errbuf[sizeof(errmsg) + 25];
|
||||
|
||||
sprintf(errbuf, errmsg, i+2);
|
||||
PyErr_SetString(PyExc_TypeError, errbuf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue