]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Limit length of name passed to sprintf.
authorGuido van Rossum <guido@python.org>
Wed, 5 Feb 1992 11:17:30 +0000 (11:17 +0000)
committerGuido van Rossum <guido@python.org>
Wed, 5 Feb 1992 11:17:30 +0000 (11:17 +0000)
Python/ceval.c

index fc217066f0bcd463475e419ffa90cfdcec1c50e9..653b1cd54d9bdd305f4ce42aa29e1e0041dc2c8a 100644 (file)
@@ -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;