Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/alpha/alpha Make sure "args" is pointing somewhere ...
details: https://anonhg.NetBSD.org/src/rev/5e5ef27d18e5
branches: trunk
changeset: 554524:5e5ef27d18e5
user: mycroft <mycroft%NetBSD.org@localhost>
date: Wed Oct 29 04:58:26 2003 +0000
description:
Make sure "args" is pointing somewhere sane before calling trace_exit().
diffstat:
sys/arch/alpha/alpha/linux_syscall.c | 10 ++++++----
sys/arch/alpha/alpha/osf1_syscall.c | 10 ++++++----
sys/arch/alpha/alpha/syscall.c | 10 ++++++----
3 files changed, 18 insertions(+), 12 deletions(-)
diffs (117 lines):
diff -r 0ab39b957004 -r 5e5ef27d18e5 sys/arch/alpha/alpha/linux_syscall.c
--- a/sys/arch/alpha/alpha/linux_syscall.c Wed Oct 29 04:53:39 2003 +0000
+++ b/sys/arch/alpha/alpha/linux_syscall.c Wed Oct 29 04:58:26 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_syscall.c,v 1.11 2003/10/27 07:07:35 chs Exp $ */
+/* $NetBSD: linux_syscall.c,v 1.12 2003/10/29 04:58:26 mycroft Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: linux_syscall.c,v 1.11 2003/10/27 07:07:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_syscall.c,v 1.12 2003/10/29 04:58:26 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -267,7 +267,7 @@
const struct sysent *callp;
int error;
u_int64_t rval[2];
- u_int64_t *args = NULL, copyargs[10]; /* XXX */
+ u_int64_t *args, copyargs[10];
u_int hidden, nargs;
struct proc *p = l->l_proc;
@@ -297,8 +297,10 @@
default:
error = copyin((caddr_t)alpha_pal_rdusp(), ©args[6],
(nargs - 6) * sizeof(u_int64_t));
- if (error)
+ if (error) {
+ args = copyargs;
goto bad;
+ }
case 6:
copyargs[5] = framep->tf_regs[FRAME_A5];
case 5:
diff -r 0ab39b957004 -r 5e5ef27d18e5 sys/arch/alpha/alpha/osf1_syscall.c
--- a/sys/arch/alpha/alpha/osf1_syscall.c Wed Oct 29 04:53:39 2003 +0000
+++ b/sys/arch/alpha/alpha/osf1_syscall.c Wed Oct 29 04:58:26 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_syscall.c,v 1.13 2003/10/27 07:07:35 chs Exp $ */
+/* $NetBSD: osf1_syscall.c,v 1.14 2003/10/29 04:58:26 mycroft Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -102,7 +102,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: osf1_syscall.c,v 1.13 2003/10/27 07:07:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_syscall.c,v 1.14 2003/10/29 04:58:26 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -263,7 +263,7 @@
const struct sysent *callp;
int error;
u_int64_t rval[2];
- u_int64_t *args = NULL, copyargs[10]; /* XXX */
+ u_int64_t *args, copyargs[10];
u_int hidden, nargs;
struct proc *p = l->l_proc;
@@ -293,8 +293,10 @@
default:
error = copyin((caddr_t)alpha_pal_rdusp(), ©args[6],
(nargs - 6) * sizeof(u_int64_t));
- if (error)
+ if (error) {
+ args = copyargs;
goto bad;
+ }
case 6:
copyargs[5] = framep->tf_regs[FRAME_A5];
case 5:
diff -r 0ab39b957004 -r 5e5ef27d18e5 sys/arch/alpha/alpha/syscall.c
--- a/sys/arch/alpha/alpha/syscall.c Wed Oct 29 04:53:39 2003 +0000
+++ b/sys/arch/alpha/alpha/syscall.c Wed Oct 29 04:58:26 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: syscall.c,v 1.11 2003/10/27 07:07:35 chs Exp $ */
+/* $NetBSD: syscall.c,v 1.12 2003/10/29 04:58:26 mycroft Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -100,7 +100,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.11 2003/10/27 07:07:35 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: syscall.c,v 1.12 2003/10/29 04:58:26 mycroft Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -265,7 +265,7 @@
const struct sysent *callp;
int error;
u_int64_t rval[2];
- u_int64_t *args = NULL, copyargs[10]; /* XXX */
+ u_int64_t *args, copyargs[10];
u_int hidden, nargs;
struct proc *p = l->l_proc;
@@ -299,8 +299,10 @@
default:
error = copyin((caddr_t)alpha_pal_rdusp(), ©args[6],
(nargs - 6) * sizeof(u_int64_t));
- if (error)
+ if (error) {
+ args = copyargs;
goto bad;
+ }
case 6:
copyargs[5] = framep->tf_regs[FRAME_A5];
case 5:
Home |
Main Index |
Thread Index |
Old Index