shithub: riscv

Download patch

ref: 3133a2a4e70740906fd69abe6a2304f8bdedd448
parent: b26ec24f9d04ae169dd6340b458168dc88036191
parent: b32300deb06b94f76a4aec144d23bbec3049d85f
author: cinap_lenrek <[email protected]>
date: Thu Nov 5 21:55:11 EST 2015

merge

--- a/sys/src/9/port/fault.c
+++ b/sys/src/9/port/fault.c
@@ -301,7 +301,7 @@
 {
 	Segment *s;
 
-	if((long)len >= 0) {
+	if((long)len >= 0 && addr+len >= addr) {
 		for(;;) {
 			s = seg(up, addr, 0);
 			if(s == nil || (write && (s->type&SG_RONLY)))