NetBSD Problem Report #39733
From www@NetBSD.org Sun Oct 12 12:18:33 2008
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 666AF63BA54
for <gnats-bugs@gnats.netbsd.org>; Sun, 12 Oct 2008 12:18:33 +0000 (UTC)
Message-Id: <20081012121833.2C7D963B88A@narn.NetBSD.org>
Date: Sun, 12 Oct 2008 12:18:33 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Sizeof(pointer) bug in usr.bin/xlint/lint1/scan.l .
X-Send-Pr-Version: www-1.0
>Number: 39733
>Category: bin
>Synopsis: Sizeof(pointer) bug in usr.bin/xlint/lint1/scan.l .
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Oct 12 12:20:01 +0000 2008
>Closed-Date: Mon Oct 13 14:01:35 +0000 2008
>Last-Modified: Mon Oct 13 14:05:01 +0000 2008
>Originator: Henning Petersen
>Release: Netbsd-current
>Organization:
>Environment:
>Description:
Correct sizeof(pointer) bug that should have been sizeof(*pointer).
>How-To-Repeat:
>Fix:
diff -u -r1.40 scan.l
--- usr.bin/xlint/lint1/scan.l 26 Sep 2008 22:52:24 -0000 1.40
+++ usr.bin/xlint/lint1/scan.l 12 Oct 2008 10:30:58 -0000
@@ -324,7 +324,7 @@
} else {
sb = xmalloc(sizeof (sbuf_t));
}
- (void)memset(sb, 0, sizeof (sb));
+ (void)memset(sb, 0, sizeof (*sb));
return (sb);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 13 Oct 2008 14:01:35 +0000
State-Changed-Why:
Fixed, thanks
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/39733 CVS commit: src/usr.bin/xlint/lint1
Date: Mon, 13 Oct 2008 14:00:37 +0000 (UTC)
Module Name: src
Committed By: dholland
Date: Mon Oct 13 14:00:37 UTC 2008
Modified Files:
src/usr.bin/xlint/lint1: scan.l
Log Message:
Fix wrong memset; PR bin/39733 from Henning Petersen.
To generate a diff of this commit:
cvs rdiff -r1.40 -r1.41 src/usr.bin/xlint/lint1/scan.l
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>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.