Module Name:    src
Committed By:   christos
Date:           Fri Feb 10 04:00:48 UTC 2017

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

Log Message:
kill variable stack allocation


To generate a diff of this commit:
cvs rdiff -u -r1.143 -r1.144 src/sys/arch/sgimips/sgimips/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/sgimips/sgimips/machdep.c
diff -u src/sys/arch/sgimips/sgimips/machdep.c:1.143 src/sys/arch/sgimips/sgimips/machdep.c:1.144
--- src/sys/arch/sgimips/sgimips/machdep.c:1.143	Thu Dec 22 09:47:59 2016
+++ src/sys/arch/sgimips/sgimips/machdep.c	Thu Feb  9 23:00:48 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.143 2016/12/22 14:47:59 cherry Exp $	*/
+/*	$NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $	*/
 
 /*
  * Copyright (c) 2000 Soren S. Jorvang
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.143 2016/12/22 14:47:59 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.144 2017/02/10 04:00:48 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -255,7 +255,10 @@ mach_init(int argc, int32_t argv32[], ui
 	struct btinfo_symtab *bi_syms;
 #endif
 #ifdef _LP64
-	char *argv[argc+1];
+	char *argv[20];
+
+	if (argc >= __arraycount(argv))
+		panic("too many args");
 
 	for (i = 0; i < argc; i++) {
 		argv[i] = (void *)(intptr_t)argv32[i];

Reply via email to