From 16dfd29e4490e41e07cef90e55b43e85e12ff80f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 5 Feb 1992 11:17:30 +0000 Subject: [PATCH] Limit length of name passed to sprintf. --- Python/ceval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/ceval.c b/Python/ceval.c index fc217066f0b..653b1cd54d9 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;