git: 9front

Download patch

ref: 536605787ce88b3260ee23ffea89b753693022b9
parent: 07a91e613de9ffe704d213bb25bcc40fdaf01c99
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Fri Jan 25 09:17:41 EST 2013

libdraw: fix memory corruption bug in initdisplay()

--- a/sys/src/libdraw/init.c
+++ b/sys/src/libdraw/init.c
@@ -253,7 +253,7 @@
 	}
 	if(n==NINFO+1)
 		n = NINFO;
-	buf[n] = '\0';
+	info[n] = '\0';
 	isnew = 0;
 	if(n < NINFO)	/* this will do for now, we need something better here */
 		isnew = 1;
--