acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
go seems to accidently creates ridiculous long symbol names causing acid to crash.
This commit is contained in:
parent
9c2fb9602d
commit
5e2478ccbb
1 changed files with 6 additions and 0 deletions
|
@ -71,6 +71,12 @@ varsym(void)
|
|||
if(s->name[0] == '.')
|
||||
continue;
|
||||
|
||||
if(strlen(s->name) >= sizeof(buf)-6){
|
||||
if(!quiet)
|
||||
print("Symbol name too long: %s\n", s->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
v = s->value;
|
||||
tl = al(TLIST);
|
||||
*tail = tl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue