NetBSD Problem Report #44326
From www@NetBSD.org Tue Jan 4 07:49:01 2011
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 6C31663B89F
for <gnats-bugs@gnats.NetBSD.org>; Tue, 4 Jan 2011 07:49:01 +0000 (UTC)
Message-Id: <20110104074901.4ECD563B87A@www.NetBSD.org>
Date: Tue, 4 Jan 2011 07:49:01 +0000 (UTC)
From: henning.petersen@t-online.de
Reply-To: henning.petersen@t-online.de
To: gnats-bugs@NetBSD.org
Subject: Missing format string in fwctl.
X-Send-Pr-Version: www-1.0
>Number: 44326
>Category: bin
>Synopsis: Missing format string in fwctl.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jan 04 07:50:00 +0000 2011
>Closed-Date: Tue Jan 04 09:04:41 +0000 2011
>Last-Modified: Tue Jan 04 09:05:02 +0000 2011
>Originator: Henning Petersen
>Release: NetBSD-current
>Organization:
>Environment:
>Description:
Missing format string in fwctl.
>How-To-Repeat:
>Fix:
diff -u -r1.4 fwdv.c
--- usr.sbin/fwctl/fwdv.c 24 Aug 2010 08:41:24 -0000 1.4
+++ usr.sbin/fwctl/fwdv.c 4 Jan 2011 06:23:39 -0000
@@ -107,7 +107,7 @@
} else {
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
if (fd == -1)
- err(EX_NOINPUT, filename);
+ err(EX_NOINPUT, "%s", filename);
}
buf = malloc(RBUFSIZE);
pad = malloc(DSIZE*MAXBLOCKS);
@@ -269,7 +269,7 @@
fd = open(filename, O_RDONLY);
if (fd == -1)
- err(EX_NOINPUT, filename);
+ err(EX_NOINPUT, "%s", filename);
pbuf = malloc(DSIZE * TNBUF);
bzero(wbuf, sizeof(wbuf));
diff -u -r1.2 fwmpegts.c
--- usr.sbin/fwctl/fwmpegts.c 24 Aug 2010 08:41:24 -0000 1.2
+++ usr.sbin/fwctl/fwmpegts.c 4 Jan 2011 06:23:39 -0000
@@ -156,7 +156,7 @@
else {
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
if (fd == -1)
- err(EX_NOINPUT, filename);
+ err(EX_NOINPUT, "%s", filename);
}
buf = malloc(RBUFSIZE);
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Tue, 04 Jan 2011 09:04:41 +0000
State-Changed-Why:
Committed, thanks!
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/44326 CVS commit: src/usr.sbin/fwctl
Date: Tue, 4 Jan 2011 09:04:24 +0000
Module Name: src
Committed By: wiz
Date: Tue Jan 4 09:04:24 UTC 2011
Modified Files:
src/usr.sbin/fwctl: fwdv.c fwmpegts.c
Log Message:
Use format string for err(). From Henning Petersen in PR 44326.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/fwctl/fwdv.c
cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/fwctl/fwmpegts.c
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.