diff Python/getargs.c @ 7120:0efed4d3323b legacy-trunk

Protect PyErr_Format format string argument from overflow (ironically, the error was about a bad format string :-).
author Guido van Rossum <guido@python.org>
date Mon, 19 Jan 1998 22:22:44 +0000
parents 74ad26825060
children a909a2869ac5
line wrap: on
line diff
--- a/Python/getargs.c	Mon Jan 19 22:16:36 1998 +0000
+++ b/Python/getargs.c	Mon Jan 19 22:22:44 1998 +0000
@@ -261,7 +261,7 @@
 	    *format != '(' &&
 	    *format != '|' && *format != ':' && *format != ';') {
 		PyErr_Format(PyExc_SystemError,
-			     "bad format string: %s", formatsave);
+			     "bad format string: %.200s", formatsave);
 		return 0;
 	}