From 15e33a4c42c9afacbe93eb4e3102a5e068e292eb Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 30 Apr 1997 19:00:27 +0000 Subject: Avoid sprintf buffer overflow if more than 9999 arguments. --- Python/bltinmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ 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); -- cgit v0.12