Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern CID 1308958: Fix reversed arguments in copyin(9)
details: https://anonhg.NetBSD.org/src/rev/92aca3e50147
branches: trunk
changeset: 809285:92aca3e50147
user: christos <christos%NetBSD.org@localhost>
date: Mon Jun 29 15:44:45 2015 +0000
description:
CID 1308958: Fix reversed arguments in copyin(9)
diffstat:
sys/kern/sys_mqueue.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r eebb91606ddc -r 92aca3e50147 sys/kern/sys_mqueue.c
--- a/sys/kern/sys_mqueue.c Mon Jun 29 15:39:40 2015 +0000
+++ b/sys/kern/sys_mqueue.c Mon Jun 29 15:44:45 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_mqueue.c,v 1.38 2015/06/20 14:41:54 martin Exp $ */
+/* $NetBSD: sys_mqueue.c,v 1.39 2015/06/29 15:44:45 christos Exp $ */
/*
* Copyright (c) 2007-2011 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -43,7 +43,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.38 2015/06/20 14:41:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_mqueue.c,v 1.39 2015/06/29 15:44:45 christos Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -618,8 +618,8 @@
struct mq_attr *attr = NULL, a;
int error;
- if ((SCARG(uap, oflag) & O_CREAT) && (SCARG(uap,attr) != NULL)) {
- error = copyin(&a, SCARG(uap,attr), sizeof(a));
+ if ((SCARG(uap, oflag) & O_CREAT) != 0 && SCARG(uap, attr) != NULL) {
+ error = copyin(SCARG(uap, attr), &a, sizeof(a));
if (error)
return error;
attr = &a;
Home |
Main Index |
Thread Index |
Old Index