summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-01-19 22:22:44 +0000
committerGuido van Rossum <guido@python.org>1998-01-19 22:22:44 +0000
commit17ae6ce7e04e9916afda733083ea3fb0fce5b377 (patch)
tree2b52be65a753e73a763bb872ee33273a1c83f3ac /Python
parent0ac28f60f9bbb838fecd911fca76855f5c0cdf66 (diff)
downloadcpython-17ae6ce7e04e9916afda733083ea3fb0fce5b377.tar.gz
Protect PyErr_Format format string argument from overflow (ironically,
the error was about a bad format string :-).
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index 296a3aa2c7..7bc150d1e4 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;
}