Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/sysvbfs At least fetch mount data pointer before usin...
details: https://anonhg.NetBSD.org/src/rev/42c038f1e26c
branches: trunk
changeset: 325443:42c038f1e26c
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Wed Dec 25 11:15:49 2013 +0000
description:
At least fetch mount data pointer before using it.
Coverity CID 274767
diffstat:
sys/fs/sysvbfs/sysvbfs_vfsops.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 3d15383f8e19 -r 42c038f1e26c sys/fs/sysvbfs/sysvbfs_vfsops.c
--- a/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Dec 25 11:11:55 2013 +0000
+++ b/sys/fs/sysvbfs/sysvbfs_vfsops.c Wed Dec 25 11:15:49 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $ */
+/* $NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.41 2012/06/14 01:08:22 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysvbfs_vfsops.c,v 1.42 2013/12/25 11:15:49 mlelstv Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -81,7 +81,7 @@
return EINVAL;
if (mp->mnt_flag & MNT_GETARGS) {
- if ((bmp = (void *)mp->mnt_data) == NULL)
+ if ((bmp = (struct sysvbfs_mount *)mp->mnt_data) == NULL)
return EIO;
args->fspec = NULL;
*data_len = sizeof *args;
@@ -116,6 +116,7 @@
* Be sure we're still naming the same device
* used for our initial mount
*/
+ bmp = (struct sysvbfs_mount *)mp->mnt_data;
if (devvp != bmp->devvp)
error = EINVAL;
}
Home |
Main Index |
Thread Index |
Old Index