Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat Uninitialized var, found by mootja; not tested, b...



details:   https://anonhg.NetBSD.org/src/rev/c5751f59ff25
branches:  trunk
changeset: 818328:c5751f59ff25
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Oct 08 15:48:07 2016 +0000

description:
Uninitialized var, found by mootja; not tested, but obvious enough

diffstat:

 sys/compat/sunos/sunos_ioctl.c   |  6 +++---
 sys/compat/ultrix/ultrix_ioctl.c |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 1241fd672cdf -r c5751f59ff25 sys/compat/sunos/sunos_ioctl.c
--- a/sys/compat/sunos/sunos_ioctl.c    Sat Oct 08 13:23:53 2016 +0000
+++ b/sys/compat/sunos/sunos_ioctl.c    Sat Oct 08 15:48:07 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $        */
+/*     $NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $    */
 
 /*
  * Copyright (c) 1993 Markus Wild.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.67 2015/12/12 17:48:18 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunos_ioctl.c,v 1.68 2016/10/08 15:48:07 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -443,7 +443,7 @@
            {
                int x;  /* unused */
 
-               error = copyin((void *)&x, SCARG(uap, data), sizeof x);
+               error = copyin(SCARG(uap, data), (void *)&x, sizeof x);
                break;
            }
        case _IOR('t', 100, int):       /* sun SUNOS_TIOCSSOFTCAR */
diff -r 1241fd672cdf -r c5751f59ff25 sys/compat/ultrix/ultrix_ioctl.c
--- a/sys/compat/ultrix/ultrix_ioctl.c  Sat Oct 08 13:23:53 2016 +0000
+++ b/sys/compat/ultrix/ultrix_ioctl.c  Sat Oct 08 15:48:07 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ultrix_ioctl.c,v 1.36 2009/12/14 00:47:12 matt Exp $ */
+/*     $NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv 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.36 2009/12/14 00:47:12 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ultrix_ioctl.c,v 1.37 2016/10/08 15:48:07 maxv Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_compat_ultrix.h"
@@ -491,7 +491,7 @@
            {
                int x;  /* unused */
 
-               return copyin(&x, SCARG(&ap, data), sizeof x);
+               return copyin(SCARG(&ap, data), &x, sizeof x);
            }
        case _IOR('t', 100, int):       /* sun SUNOS_TIOCSSOFTCAR */
            {



Home | Main Index | Thread Index | Old Index