diff Python/bltinmodule.c @ 5388:13a30cea8dbf legacy-trunk

Avoid sprintf buffer overflow if more than 9999 arguments.
author Guido van Rossum <guido@python.org>
date Wed, 30 Apr 1997 19:00:27 +0000
parents 5880384d7c71
children dacbfaa07c40
line wrap: on
line diff
--- a/Python/bltinmodule.c	Wed Apr 30 18:12:27 1997 +0000
+++ b/Python/bltinmodule.c	Wed Apr 30 19:00:27 1997 +0000
@@ -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);