ref: b32300deb06b94f76a4aec144d23bbec3049d85f
parent: 2ba46903fa70ff92d923d10ff71cd6a32bcfdf84
author: cinap_lenrek <[email protected]>
date: Thu Nov 5 21:53:30 EST 2015
kernel: fix okaddr() check
--- 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)))