Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm in uvm_map_extract(), handle the case where the map ...



details:   https://anonhg.NetBSD.org/src/rev/f3f1d0f38a0d
branches:  trunk
changeset: 472040:f3f1d0f38a0d
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Apr 19 14:43:46 1999 +0000

description:
in uvm_map_extract(), handle the case where the map entry being extracted
is large enough to cause the end address of the new entry to overflow.

diffstat:

 sys/uvm/uvm_map.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r e75e63c74962 -r f3f1d0f38a0d sys/uvm/uvm_map.c
--- a/sys/uvm/uvm_map.c Mon Apr 19 13:17:09 1999 +0000
+++ b/sys/uvm/uvm_map.c Mon Apr 19 14:43:46 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_map.c,v 1.36 1999/03/28 19:53:50 mycroft Exp $     */
+/*     $NetBSD: uvm_map.c,v 1.37 1999/04/19 14:43:46 chs Exp $ */
 
 /* 
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -1455,7 +1455,7 @@
                newentry->start = dstaddr + oldoffset;
                newentry->end =
                    newentry->start + (entry->end - (entry->start + fudge));
-               if (newentry->end > newend)
+               if (newentry->end > newend || newentry->end < newentry->start)
                        newentry->end = newend;
                newentry->object.uvm_obj = entry->object.uvm_obj;
                if (newentry->object.uvm_obj) {



Home | Main Index | Thread Index | Old Index