Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbmips/gdium PR/50735: David Binderman: Check boun...
details: https://anonhg.NetBSD.org/src/rev/2492d4b18ef2
branches: trunk
changeset: 343393:2492d4b18ef2
user: christos <christos%NetBSD.org@localhost>
date: Mon Feb 01 17:37:39 2016 +0000
description:
PR/50735: David Binderman: Check bounds before dereferencing.
diffstat:
sys/arch/evbmips/gdium/machdep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e8cdfb2accd8 -r 2492d4b18ef2 sys/arch/evbmips/gdium/machdep.c
--- a/sys/arch/evbmips/gdium/machdep.c Mon Feb 01 17:34:00 2016 +0000
+++ b/sys/arch/evbmips/gdium/machdep.c Mon Feb 01 17:37:39 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.17 2014/03/24 20:06:31 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.18 2016/02/01 17:37:39 christos Exp $ */
/*
* Copyright 2001, 2002 Wasabi Systems, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2014/03/24 20:06:31 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2016/02/01 17:37:39 christos Exp $");
#include "opt_ddb.h"
#include "opt_execfmt.h"
@@ -221,7 +221,7 @@
* #ifdef orgy
*/
i = 0;
- while ((eptrs[i] != 0) && (i < 128)) {
+ while (i < 128 && eptrs[i] != 0) {
envp[i] = (char *)(intptr_t)eptrs[i]; /* sign extend */
i++;
}
Home |
Main Index |
Thread Index |
Old Index