Module Name:    src
Committed By:   christos
Date:           Mon Apr  3 17:37:29 UTC 2017

Modified Files:
        src/sys/arch/x68k/x68k: machdep.c

Log Message:
PR/52135: David Binderman: Fix loop bounds checking.


To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/arch/x68k/x68k/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/x68k/machdep.c
diff -u src/sys/arch/x68k/x68k/machdep.c:1.195 src/sys/arch/x68k/x68k/machdep.c:1.196
--- src/sys/arch/x68k/x68k/machdep.c:1.195	Fri Dec 23 02:15:28 2016
+++ src/sys/arch/x68k/x68k/machdep.c	Mon Apr  3 13:37:29 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.195 2016/12/23 07:15:28 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.196 2017/04/03 17:37:29 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.195 2016/12/23 07:15:28 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.196 2017/04/03 17:37:29 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -693,7 +693,7 @@ cpu_dumpconf(void)
 	chdrsize = cpu_dumpsize();
 
 	dumpsize = 0;
-	for (i = 0; m->ram_segs[i].size && i < M68K_NPHYS_RAM_SEGS; i++)
+	for (i = 0; i < M68K_NPHYS_RAM_SEGS && m->ram_segs[i].size; i++)
 		dumpsize += btoc(m->ram_segs[i].size);
 	/*
 	 * Check to see if we will fit.  Note we always skip the

Reply via email to