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:
cinap_lenrek 2013-09-20 16:02:10 +02:00
parent 9c2fb9602d
commit 5e2478ccbb

View file

@ -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;