git: 9front

Download patch

ref: 6a9374958717152cc7a302b0cb4ddad5c931862d
parent: 62d7b38cca2d16614356d3524a720056f1361dfc
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Sep 20 12:02:10 EDT 2013

acid: handle buffer overflow with ridiculous long symbol names (thanks mischief)

go seems to accidently creates ridiculous long symbol names
causing acid to crash.

--- a/sys/src/cmd/acid/util.c
+++ b/sys/src/cmd/acid/util.c
@@ -71,6 +71,12 @@
 			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;
--