From 0d6b49eff2bae85a7ea5231e665faafc6e598513 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 19 Jan 1998 22:22:44 +0000 Subject: Protect PyErr_Format format string argument from overflow (ironically, the error was about a bad format string :-). --- Python/getargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/getargs.c b/Python/getargs.c index 296a3aa..7bc150d 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -261,7 +261,7 @@ vgetargs1(args, format, p_va, compat) *format != '(' && *format != '|' && *format != ':' && *format != ';') { PyErr_Format(PyExc_SystemError, - "bad format string: %s", formatsave); + "bad format string: %.200s", formatsave); return 0; } -- cgit v0.12