summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-02-05 11:17:30 (GMT)
committerGuido van Rossum <guido@python.org>1992-02-05 11:17:30 (GMT)
commit16dfd29e4490e41e07cef90e55b43e85e12ff80f (patch)
treea4a4e4cdca5b54cf18d679ba75af0a4f857e3153 /Python
parentc4884007f967ebab9a3fc54a6fe81ece9839efa0 (diff)
downloadcpython-16dfd29e4490e41e07cef90e55b43e85e12ff80f.zip
cpython-16dfd29e4490e41e07cef90e55b43e85e12ff80f.tar.gz
cpython-16dfd29e4490e41e07cef90e55b43e85e12ff80f.tar.bz2
Limit length of name passed to sprintf.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index fc21706..653b1cd 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -1934,7 +1934,7 @@ import_from(locals, v, name)
x = dict2lookup(w, name);
if (x == NULL) {
char buf[250];
- sprintf(buf, "cannot import name %s",
+ sprintf(buf, "cannot import name %.230s",
getstringvalue(name));
err_setstr(ImportError, buf);
return -1;