Debian Bug report logs - #756602
printf(3) manpage: please document that %n can't include flags, width or precision

version graph

Package: manpages-dev; Maintainer for manpages-dev is Dr. Tobias Quathamer <[email protected]>; Source for manpages-dev is src:manpages (PTS, buildd, popcon).

Reported by: Jakub Wilk <[email protected]>

Date: Thu, 31 Jul 2014 09:30:02 UTC

Severity: minor

Tags: fixed-upstream

Found in version manpages/3.65-1

Fixed in version manpages/3.71-1

Done: Simon Paillard <[email protected]>

Bug is archived. No further changes may be made.

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#756602: printf(3) manpage: please document that %n can't include flags, width or precision
Reply-To: [email protected], [email protected]
Resent-From: "Michael Kerrisk (man-pages)" <[email protected]>
Resent-To: [email protected]
Resent-CC: Martin Schulze <[email protected]>
X-Loop: [email protected]
Resent-Date: Thu, 31 Jul 2014 10:45:10 +0000
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: followup 756602
X-Debian-PR-Package: manpages-dev
X-Debian-PR-Keywords: 
X-Debian-PR-Source: manpages
Received: via spool by [email protected] id=B756602.140680337317860
          (code B ref 756602); Thu, 31 Jul 2014 10:45:10 +0000
Received: (at 756602) by bugs.debian.org; 31 Jul 2014 10:42:53 +0000
X-Spam-Checker-Version: SpamAssassin 3.3.2-bugs.debian.org_2005_01_02
	(2011-06-06) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-8.9 required=4.0 tests=BAYES_00,DKIM_SIGNED,
	DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HAS_BUG_NUMBER,MURPHY_DRUGS_REL8,
	RCVD_IN_DNSWL_LOW,SPF_PASS,VALID_BTS_CONTROL autolearn=unavailable
	version=3.3.2-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 7; hammy, 106; neutral, 40; spammy, 0.
	spammytokens: hammytokens:0.000-+--manpage, 0.000-+--man3, 0.000-+--glibc,
	0.000-+--jakub, 0.000-+--Jakub
Received: from mail-vc0-f171.google.com ([209.85.220.171])
	by buxtehude.debian.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:128)
	(Exim 4.80)
	(envelope-from <[email protected]>)
	id 1XCnoz-0004cC-Fo; Thu, 31 Jul 2014 10:42:53 +0000
Received: by mail-vc0-f171.google.com with SMTP id hq11so3841655vcb.16
        for <multiple recipients>; Thu, 31 Jul 2014 03:42:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:reply-to:in-reply-to:references:from:date:message-id
         :subject:to:cc:content-type;
        bh=LF1gTxppyyvfaAw0WA0lGsO2q55pswYdQEzT5F/PKZ0=;
        b=Pepd2E5WF+PMTDx9bWg+IEE9zaRIMg0j06caBqd24LIjwk+N6FLgwIFZ+bejPyPOIx
         w4huPmmYyKKyNstXKachUBOAKVp4S1ggZgtQ7U/3f1osvzufh5h9IYvmj03Zjfrb5Jbb
         2BnJkTHKPpgkRr7yXFug5mXjsQHq80nvgcVrQQB0BXEWu7rjN/xYRJg8QYRg8sRkST9N
         sFexb3YCfrZMMV9yHmyaxDkIRSIqciSH6nzeqNMAWQgi7QhvjqhteOmfJwRubSqHjDA4
         ODwc5DzpdYTXkJtH/PLkGY4loglinX6920bg9TTh3ZpnhHRH19ANWsX+Zd78wlaDhc3d
         8R2g==
X-Received: by 10.52.163.136 with SMTP id yi8mr13841256vdb.14.1406803366011;
 Thu, 31 Jul 2014 03:42:46 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.146.6 with HTTP; Thu, 31 Jul 2014 03:42:25 -0700 (PDT)
In-Reply-To: <[email protected]>
References: <[email protected]>
From: "Michael Kerrisk (man-pages)" <[email protected]>
Date: Thu, 31 Jul 2014 12:42:25 +0200
Message-ID: <CAKgNAki86fRqeQS4oJQJWVvMUwwecSWVvkM7k1LO646TULJi_A@mail.gmail.com>
To: Jakub Wilk <[email protected]>, [email protected]
Cc: [email protected]
Content-Type: text/plain; charset=UTF-8
X-CrossAssassin-Score: 2
tags 756602 fixed-upstream
thanks

Hello Jakub,

I've applied the patch below.

Cheers,

Michael

--- a/man3/printf.3
+++ b/man3/printf.3
@@ -332,9 +332,7 @@ For other conversions, the behavior is undefined.
 .B \-
 The converted value is to be left adjusted on the field boundary.
 (The default is right justification.)
-Except for
-.B n
-conversions, the converted value is padded on the right with blanks, rather
+The converted value is padded on the right with blanks, rather
 than on the left with blanks or zeros.
 A
 .B \-
@@ -788,10 +786,17 @@ or
 .TP
 .B n
 The number of characters written so far is stored into the integer
-indicated by the
-.I "int\ *"
-(or variant) pointer argument.
+pointed to by the corresponding argument.
+That argument shall be an
+.I "int\ *",
+or variant, as specified by the
+.B l
+or
+.B ll
+length modifier.
 No argument is converted.
+The behavior is undefined if the conversion specification includes
+any flags, a field width, or a precision.
 .TP
 .B m
 (Glibc extension.)

Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Nov 11 10:47:20 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.