shithub: drawterm

Download patch

ref: 0646450b2051b5b34f80cdf64810474b256248be
parent: dc90f87bc8192bcb81ab29d5ee3956db3ae7fb5c
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Jan 27 19:11:00 EST 2017

devmouse: fix off-by-one in mouseread() (thanks Sören)

--- a/kern/devmouse.c	Tue Jan 24 17:13:37 2017
+++ b/kern/devmouse.c	Fri Jan 27 19:11:00 2017
@@ -122,7 +122,7 @@
 long
 mouseread(Chan *c, void *va, long n, vlong offset)
 {
-	char buf[4*12+1];
+	char buf[1+4*12+1];
 	Mousestate m;
 	uchar *p;
 	int b;