mirror of
https://github.com/python/cpython.git
synced 2025-07-16 15:55:18 +00:00
Limit length of name passed to sprintf.
This commit is contained in:
parent
c4884007f9
commit
16dfd29e44
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue