NetBSD Problem Report #46373
From www@NetBSD.org Wed Apr 25 08:05:32 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id BB47563DB43
for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Apr 2012 08:05:32 +0000 (UTC)
Message-Id: <20120425080532.1151263D3F2@www.NetBSD.org>
Date: Wed, 25 Apr 2012 08:05:32 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Correct use of sizeof in dmover_io.c
X-Send-Pr-Version: www-1.0
>Number: 46373
>Category: kern
>Synopsis: Correct use of sizeof in dmover_io.c
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 25 08:10:00 +0000 2012
>Closed-Date: Sun Oct 06 12:19:01 +0000 2013
>Last-Modified: Sun Oct 06 12:19:01 +0000 2013
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Correct use of sizeof in dmover_io.c .
>How-To-Repeat:
>Fix:
diff -u -p -r1.40 dmover_io.c
--- sys/dev/dmover/dmover_io.c 14 May 2011 13:52:00 -0000 1.40
+++ sys/dev/dmover/dmover_io.c 22 Apr 2012 09:09:06 -0000
@@ -595,7 +595,7 @@ dmio_stat(struct file *fp, struct stat *
{
struct dmio_state *ds = fp->f_data;
- (void)memset(st, 0, sizeof(st));
+ (void)memset(st, 0, sizeof(*st));
KERNEL_LOCK(1, NULL);
st->st_dev = makedev(cdevsw_lookup_major(&dmoverio_cdevsw), 0);
st->st_atimespec = ds->ds_atime;
>Release-Note:
>Audit-Trail:
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46373 CVS commit: src/sys/dev/dmover
Date: Thu, 25 Jul 2013 04:32:37 +0000
Module Name: src
Committed By: msaitoh
Date: Thu Jul 25 04:32:37 UTC 2013
Modified Files:
src/sys/dev/dmover: dmover_io.c
Log Message:
Clear struct stat correctly. Fixes PR#46373.
To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/dmover/dmover_io.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 06 Oct 2013 12:19:01 +0000
State-Changed-Why:
committed in July, thanks
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.