Module Name: src
Committed By: christos
Date: Mon Apr 3 17:36:17 UTC 2017
Modified Files:
src/sys/arch/mac68k/mac68k: machdep.c
Log Message:
PR/52134: David Binderman: Fix loop bounds checking.
To generate a diff of this commit:
cvs rdiff -u -r1.349 -r1.350 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.349 src/sys/arch/mac68k/mac68k/machdep.c:1.350
--- src/sys/arch/mac68k/mac68k/machdep.c:1.349 Sat Aug 29 21:46:03 2015
+++ src/sys/arch/mac68k/mac68k/machdep.c Mon Apr 3 13:36:17 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.349 2015/08/30 01:46:03 uebayasi Exp $ */
+/* $NetBSD: machdep.c,v 1.350 2017/04/03 17:36:17 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.349 2015/08/30 01:46:03 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.350 2017/04/03 17:36:17 christos Exp $");
#include "opt_adb.h"
#include "opt_copy_symtab.h"
@@ -646,7 +646,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);
/*