diff Python/ceval.c @ 661:7e5f4d9aee77 legacy-trunk

Limit length of name passed to sprintf.
author Guido van Rossum <guido@python.org>
date Wed, 05 Feb 1992 11:17:30 +0000
parents 0214bbf47bf6
children 10002e1bc526
line wrap: on
line diff
--- a/Python/ceval.c	Wed Feb 05 11:16:47 1992 +0000
+++ b/Python/ceval.c	Wed Feb 05 11:17:30 1992 +0000
@@ -1934,7 +1934,7 @@
 		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;