summaryrefslogtreecommitdiff
path: root/sys/compat/ibcs2
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ibcs2')
-rw-r--r--sys/compat/ibcs2/ibcs2_misc.c4
-rw-r--r--sys/compat/ibcs2/ibcs2_stat.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/compat/ibcs2/ibcs2_misc.c b/sys/compat/ibcs2/ibcs2_misc.c
index b817aac8f6c..6a52735b32d 100644
--- a/sys/compat/ibcs2/ibcs2_misc.c
+++ b/sys/compat/ibcs2/ibcs2_misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_misc.c,v 1.15 2000/03/05 20:32:13 deraadt Exp $ */
+/* $OpenBSD: ibcs2_misc.c,v 1.16 2000/09/07 17:52:23 ericj Exp $ */
/* $NetBSD: ibcs2_misc.c,v 1.23 1997/01/15 01:37:49 perry Exp $ */
/*
@@ -1018,6 +1018,7 @@ ibcs2_sys_utime(p, v, retval)
struct timeval *tp;
caddr_t sg = stackgap_init(p->p_emul);
+ tp = stackgap_alloc(&sg, 2 * sizeof(struct timeval *));
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&sa, path) = SCARG(uap, path);
if (SCARG(uap, buf)) {
@@ -1027,7 +1028,6 @@ ibcs2_sys_utime(p, v, retval)
sizeof(ubuf));
if (error)
return error;
- tp = stackgap_alloc(&sg, 2 * sizeof(struct timeval *));
tp[0].tv_sec = ubuf.actime;
tp[0].tv_usec = 0;
tp[1].tv_sec = ubuf.modtime;
diff --git a/sys/compat/ibcs2/ibcs2_stat.c b/sys/compat/ibcs2/ibcs2_stat.c
index 4614b6a1f44..9a076503551 100644
--- a/sys/compat/ibcs2/ibcs2_stat.c
+++ b/sys/compat/ibcs2/ibcs2_stat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ibcs2_stat.c,v 1.4 1997/01/23 16:12:19 niklas Exp $ */
+/* $OpenBSD: ibcs2_stat.c,v 1.5 2000/09/07 17:52:23 ericj Exp $ */
/* $NetBSD: ibcs2_stat.c,v 1.5 1996/05/03 17:05:32 christos Exp $ */
/*
@@ -171,9 +171,10 @@ ibcs2_sys_stat(p, v, retval)
int error;
caddr_t sg = stackgap_init(p->p_emul);
+ SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&cup, path) = SCARG(uap, path);
- SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
+
if ((error = compat_43_sys_stat(p, &cup, retval)) != 0)
return error;
if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)
@@ -199,9 +200,10 @@ ibcs2_sys_lstat(p, v, retval)
int error;
caddr_t sg = stackgap_init(p->p_emul);
+ SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
IBCS2_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
SCARG(&cup, path) = SCARG(uap, path);
- SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
+
if ((error = compat_43_sys_lstat(p, &cup, retval)) != 0)
return error;
if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)