Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 16dfd29

Browse files
committed
Limit length of name passed to sprintf.
1 parent c488400 commit 16dfd29

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Python/ceval.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ import_from(locals, v, name)
19341934
x = dict2lookup(w, name);
19351935
if (x == NULL) {
19361936
char buf[250];
1937-
sprintf(buf, "cannot import name %s",
1937+
sprintf(buf, "cannot import name %.230s",
19381938
getstringvalue(name));
19391939
err_setstr(ImportError, buf);
19401940
return -1;

0 commit comments

Comments
 (0)