diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-20 16:02:10 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-09-20 16:02:10 +0200 |
commit | 5e2478ccbb7927256f72cb749cf1a8d97dbbd4e9 (patch) | |
tree | ecc051765da22d72697feb661e6098804cefe32c | |
parent | 9c2fb9602ddf3238364ec39cbf3f665c98d10e91 (diff) | |
download | plan9front-5e2478ccbb7927256f72cb749cf1a8d97dbbd4e9.tar.xz |
acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)
go seems to accidently creates ridiculous long symbol names
causing acid to crash.
-rw-r--r-- | sys/src/cmd/acid/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |