diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index c8f3764055e4..8437b5f2de83 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $NetBSD: sunos_misc.c,v 1.172 2018/09/03 16:29:30 riastradh Exp $ */ +/* $NetBSD: sunos_misc.c,v 1.173 2019/07/03 18:24:50 dholland Exp $ */ /* * Copyright (c) 1992, 1993 @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.172 2018/09/03 16:29:30 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos_misc.c,v 1.173 2019/07/03 18:24:50 dholland Exp $"); #include #include @@ -1013,6 +1013,7 @@ sunos_sys_reboot(struct lwp *l, const struct sunos_sys_reboot_args *uap, registe struct sunos_howto_conv *convp; int error, bsd_howto, sun_howto; char *bootstr; + char bs[128]; if ((error = kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_REBOOT, 0, NULL, NULL, NULL)) != 0) @@ -1036,8 +1037,6 @@ sunos_sys_reboot(struct lwp *l, const struct sunos_sys_reboot_args *uap, registe * next booted kernel. */ if (sun_howto & SUNOS_RB_STRING) { - char bs[128]; - error = copyinstr(SCARG(uap, bootstr), bs, sizeof(bs), 0); if (error)