NetBSD Problem Report #46372
From www@NetBSD.org Wed Apr 25 08:02:25 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 256DD63DB42
for <gnats-bugs@gnats.NetBSD.org>; Wed, 25 Apr 2012 08:02:25 +0000 (UTC)
Message-Id: <20120425080224.931A263D4A7@www.NetBSD.org>
Date: Wed, 25 Apr 2012 08:02:24 +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 mm58167.c
X-Send-Pr-Version: www-1.0
>Number: 46372
>Category: kern
>Synopsis: Correct use of sizeof in mm58167.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:05:00 +0000 2012
>Closed-Date: Thu Jul 25 04:28:57 +0000 2013
>Last-Modified: Thu Jul 25 04:28:57 +0000 2013
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Correct use of sizeof in mm58167.c .
>How-To-Repeat:
>Fix:
diff -u -p -r1.14 mm58167.c
--- sys/dev/ic/mm58167.c 12 Dec 2009 16:12:05 -0000 1.14
+++ sys/dev/ic/mm58167.c 22 Apr 2012 09:10:44 -0000
@@ -68,7 +68,7 @@ mm58167_attach(struct mm58167_softc *sc)
aprint_normal(": mm58167");
handle = &sc->_mm58167_todr_handle;
- memset(handle, 0, sizeof(handle));
+ memset(handle, 0, sizeof(*handle));
handle->cookie = sc;
handle->todr_gettime_ymdhms = mm58167_gettime_ymdhms;
handle->todr_settime_ymdhms = mm58167_settime_ymdhms;
>Release-Note:
>Audit-Trail:
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46372 CVS commit: src/sys/dev/ic
Date: Thu, 25 Jul 2013 04:21:47 +0000
Module Name: src
Committed By: msaitoh
Date: Thu Jul 25 04:21:47 UTC 2013
Modified Files:
src/sys/dev/ic: mm58167.c
Log Message:
Clear memory as intended. Fixes PR#46372.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/mm58167.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: msaitoh@NetBSD.org
State-Changed-When: Thu, 25 Jul 2013 04:28:57 +0000
State-Changed-Why:
Fixed in -current.
>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.