From owner-freebsd-bugs@FreeBSD.ORG Tue Dec 18 04:20:01 2012 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 512272DA for ; Tue, 18 Dec 2012 04:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 32FFF8FC12 for ; Tue, 18 Dec 2012 04:20:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id qBI4K1xD085287 for ; Tue, 18 Dec 2012 04:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qBI4K1tD085286; Tue, 18 Dec 2012 04:20:01 GMT (envelope-from gnats) Date: Tue, 18 Dec 2012 04:20:01 GMT Message-Id: <201212180420.qBI4K1tD085286@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Mark Johnston Subject: Re: bin/174521: printf(1) doesn't treat extra conversion specifiers as zero (posix) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Mark Johnston List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2012 04:20:01 -0000 The following reply was made to PR bin/174521; it has been noted by GNATS. From: Mark Johnston To: bug-followup@FreeBSD.org, danielsh@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--