Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/pmax PR/50737: David Binderman: Check bounds b...



details:   https://anonhg.NetBSD.org/src/rev/894e775587d1
branches:  trunk
changeset: 343395:894e775587d1
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 01 17:39:41 2016 +0000

description:
PR/50737: David Binderman: Check bounds before dereferencing.

diffstat:

 sys/arch/pmax/pmax/machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 4e8d859a101e -r 894e775587d1 sys/arch/pmax/pmax/machdep.c
--- a/sys/arch/pmax/pmax/machdep.c      Mon Feb 01 17:38:31 2016 +0000
+++ b/sys/arch/pmax/pmax/machdep.c      Mon Feb 01 17:39:41 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.249 2015/06/30 02:39:04 matt Exp $       */
+/*     $NetBSD: machdep.c,v 1.250 2016/02/01 17:39:41 christos Exp $   */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.249 2015/06/30 02:39:04 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.250 2016/02/01 17:39:41 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_modular.h"
@@ -524,7 +524,7 @@
        segstart = curaddr = i = segnum = 0;
        xsize = prom_memmap->pagesize * 8;
        while (i < mapbytes) {
-               while (prom_memmap->bitmap[i] == 0xff && i < mapbytes) {
+               while (i < mapbytes && prom_memmap->bitmap[i] == 0xff) {
                        ++i;
                        curaddr += xsize;
                }



Home | Main Index | Thread Index | Old Index