commit | 15e33a4c42c9afacbe93eb4e3102a5e068e292eb | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Wed Apr 30 19:00:27 1997 +0000 |
committer | Guido van Rossum <guido@python.org> | Wed Apr 30 19:00:27 1997 +0000 |
tree | 64f4cdc34c16f7058d8390490c7f08bb6d71de47 | |
parent | 04bc9d6e67016d0968d86744fd4379870f5a6c6e [diff] |
Avoid sprintf buffer overflow if more than 9999 arguments.
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index 3fdaac9..fd8dc80 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c
@@ -658,7 +658,7 @@ 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);