bin/174521: printf(1) doesn't treat extra conversion specifiers as zero (posix)
Mark Johnston
markjdb at gmail.com
Tue Dec 18 04:20:01 UTC 2012
The following reply was made to PR bin/174521; it has been noted by GNATS.
From: Mark Johnston <markjdb at gmail.com>
To: bug-followup at FreeBSD.org, danielsh at elego.de
Cc:
Subject: Re: bin/174521: printf(1) doesn't treat extra conversion
specifiers as zero (posix)
Date: Mon, 17 Dec 2012 23:12:50 -0500
--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
The fix for this is pretty easy - a patch is attached.
-Mark
--2oS5YaxWCcQjTEyO
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="printf_no_specifier.patch"
diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c
index 4b09342..2368f18 100644
--- a/usr.bin/printf/printf.c
+++ b/usr.bin/printf/printf.c
@@ -473,7 +473,7 @@ getnum(intmax_t *ip, uintmax_t *uip, int signedconv)
int rval;
if (!*gargv) {
- *ip = 0;
+ *ip = *uip = 0;
return (0);
}
if (**gargv == '"' || **gargv == '\'') {
--2oS5YaxWCcQjTEyO--
More information about the freebsd-bugs
mailing list