From 5e2478ccbb7927256f72cb749cf1a8d97dbbd4e9 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 20 Sep 2013 16:02:10 +0200 Subject: acid: handle buffer overflow with ridiculous long symbol names (thanks mischief) go seems to accidently creates ridiculous long symbol names causing acid to crash. --- sys/src/cmd/acid/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/src/cmd/acid/util.c b/sys/src/cmd/acid/util.c index f77e9f829..b47d4cbbb 100644 --- a/sys/src/cmd/acid/util.c +++ b/sys/src/cmd/acid/util.c @@ -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; -- cgit v1.2.3