shithub: riscv

Download patch

ref: bae3ac29fc39bc36329abf1823004c0d79b2f6f0
parent: ea7bca1829c6ba924599a2c8bc8e0c18404db6a1
author: cinap_lenrek <[email protected]>
date: Wed Jul 15 13:09:05 EDT 2015

devproc: make sure statbufread offset wont turn negative

--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -995,7 +995,7 @@
 		qunlock(&p->debug);
 		poperror();
 
-		if(i <= 0)
+		if(i <= 0 || i > j)
 			return 0;
 		if(i < n)
 			n = i;