Module Name: src Committed By: christos Date: Wed Feb 3 05:27:53 UTC 2016
Modified Files: src/sys/arch/i386/stand/boot: boot2.c Log Message: PR/50748: David Binderman: check bounds before dereference To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/i386/stand/boot/boot2.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/i386/stand/boot/boot2.c diff -u src/sys/arch/i386/stand/boot/boot2.c:1.65 src/sys/arch/i386/stand/boot/boot2.c:1.66 --- src/sys/arch/i386/stand/boot/boot2.c:1.65 Thu Jun 11 11:56:53 2015 +++ src/sys/arch/i386/stand/boot/boot2.c Wed Feb 3 00:27:53 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: boot2.c,v 1.65 2015/06/11 15:56:53 khorben Exp $ */ +/* $NetBSD: boot2.c,v 1.66 2016/02/03 05:27:53 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -266,8 +266,8 @@ print_banner(void) #ifndef SMALL int n; if (bootcfg_info.banner[0]) { - for (n = 0; bootcfg_info.banner[n] - && n < BOOTCFG_MAXBANNER; n++) + for (n = 0; n < BOOTCFG_MAXBANNER && bootcfg_info.banner[n]; + n++) printf("%s\n", bootcfg_info.banner[n]); } else { #endif /* !SMALL */