summaryrefslogtreecommitdiff
path: root/sys/compat/ultrix
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/ultrix')
-rw-r--r--sys/compat/ultrix/ultrix_ioctl.c13
-rw-r--r--sys/compat/ultrix/ultrix_misc.c9
2 files changed, 18 insertions, 4 deletions
diff --git a/sys/compat/ultrix/ultrix_ioctl.c b/sys/compat/ultrix/ultrix_ioctl.c
index 95faa29a0e4..9fccb93ecb1 100644
--- a/sys/compat/ultrix/ultrix_ioctl.c
+++ b/sys/compat/ultrix/ultrix_ioctl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ultrix_ioctl.c,v 1.38 2019/04/23 07:45:06 msaitoh Exp $ */
+/* $NetBSD: ultrix_ioctl.c,v 1.38.2.1 2022/08/03 11:11:32 martin Exp $ */
/* from : NetBSD: sunos_ioctl.c,v 1.21 1995/10/07 06:27:31 mycroft Exp */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.38 2019/04/23 07:45:06 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.38.2.1 2022/08/03 11:11:32 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_ultrix.h"
@@ -145,6 +145,8 @@ stios2btios(struct emul_termios *st, struct termios *bt)
{
uint32_t l, r;
+ memset(bt, 0, sizeof(*bt));
+
l = st->c_iflag;
r = ((l & 0x00000001) ? IGNBRK : 0);
r |= ((l & 0x00000002) ? BRKINT : 0);
@@ -276,6 +278,8 @@ btios2stios(struct termios *bt, struct emul_termios *st)
uint32_t l, r;
int speed;
+ memset(st, 0, sizeof(*st));
+
l = bt->c_iflag;
r = ((l & IGNBRK) ? 0x00000001 : 0);
r |= ((l & BRKINT) ? 0x00000002 : 0);
@@ -419,6 +423,8 @@ btios2stios(struct termios *bt, struct emul_termios *st)
static void
stios2stio(struct emul_termios *ts, struct emul_termio *t)
{
+
+ memset(t, 0, sizeof(*t));
t->c_iflag = ts->c_iflag;
t->c_oflag = ts->c_oflag;
t->c_cflag = ts->c_cflag;
@@ -433,6 +439,8 @@ stios2stio(struct emul_termios *ts, struct emul_termio *t)
static void
stio2stios(struct emul_termio *t, struct emul_termios *ts)
{
+
+ memset(ts, 0, sizeof(*t));
ts->c_iflag = t->c_iflag;
ts->c_oflag = t->c_oflag;
ts->c_cflag = t->c_cflag;
@@ -534,6 +542,7 @@ ultrix_sys_ioctl(struct lwp *l, const struct ultrix_sys_ioctl_args *uap,
if (error != 0)
return error;
+ memset(&ss, 0, sizeof(ss));
ss.ts_row = ws.ws_row;
ss.ts_col = ws.ws_col;
diff --git a/sys/compat/ultrix/ultrix_misc.c b/sys/compat/ultrix/ultrix_misc.c
index 6ab449ed954..807da554a45 100644
--- a/sys/compat/ultrix/ultrix_misc.c
+++ b/sys/compat/ultrix/ultrix_misc.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ultrix_misc.c,v 1.125 2018/08/10 21:44:59 pgoyette Exp $ */
+/* $NetBSD: ultrix_misc.c,v 1.125.4.1 2022/08/03 11:11:32 martin Exp $ */
/*
* Copyright (c) 1995, 1997 Jonathan Stone (hereinafter referred to as the author)
@@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.125 2018/08/10 21:44:59 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_misc.c,v 1.125.4.1 2022/08/03 11:11:32 martin Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -628,6 +628,7 @@ ultrix_sys_sigvec(struct lwp *l, const struct ultrix_sys_sigvec_args *uap, regis
if (error)
return error;
if (SCARG(uap, osv)) {
+ memset(&osv, 0, sizeof(osv));
osv.sv_handler = osa.sa_handler;
osv.sv_flags = osa.sa_flags ^ SA_RESTART;
osv.sv_flags &= (ULTRIX_SV_ONSTACK | ULTRIX_SV_INTERRUPT);
@@ -687,6 +688,8 @@ static int
ultrix_to_bsd_flock(struct ultrix_flock *ufl, struct flock *fl)
{
+ memset(fl, 0, sizeof(*fl));
+
fl->l_start = ufl->l_start;
fl->l_len = ufl->l_len;
fl->l_pid = ufl->l_pid;
@@ -713,6 +716,8 @@ static void
bsd_to_ultrix_flock(struct flock *fl, struct ultrix_flock *ufl)
{
+ memset(ufl, 0, sizeof(*ufl));
+
ufl->l_start = fl->l_start;
ufl->l_len = fl->l_len;
ufl->l_pid = fl->l_pid;