Kaydet (Commit) 15e33a4c authored tarafından Guido van Rossum's avatar Guido van Rossum

Avoid sprintf buffer overflow if more than 9999 arguments.

üst 04bc9d6e
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment