From owner-freebsd-bugs@FreeBSD.ORG Sun Oct 14 09:40:00 2007 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CEA3916A41B for ; Sun, 14 Oct 2007 09:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A2BC613C45D for ; Sun, 14 Oct 2007 09:40:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9E9e0cx093027 for ; Sun, 14 Oct 2007 09:40:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9E9e0tl093026; Sun, 14 Oct 2007 09:40:00 GMT (envelope-from gnats) Resent-Date: Sun, 14 Oct 2007 09:40:00 GMT Resent-Message-Id: <200710140940.l9E9e0tl093026@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yar Tikhiy Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7FE116A418; Sun, 14 Oct 2007 09:30:36 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BEEAB13C43E; Sun, 14 Oct 2007 09:30:36 +0000 (UTC) (envelope-from yar@FreeBSD.org) Received: from freefall.freebsd.org (yar@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9E9UagC092214; Sun, 14 Oct 2007 09:30:36 GMT (envelope-from yar@freefall.freebsd.org) Received: (from yar@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9E9UamK092213; Sun, 14 Oct 2007 09:30:36 GMT (envelope-from yar) Message-Id: <200710140930.l9E9UamK092213@freefall.freebsd.org> Date: Sun, 14 Oct 2007 09:30:36 GMT From: Yar Tikhiy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: rrs@FreeBSD.org Subject: bin/117175: Incorrect format strings in netstat/sctp.c X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Oct 2007 09:40:00 -0000 >Number: 117175 >Category: bin >Synopsis: Incorrect format strings in netstat/sctp.c >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 14 09:40:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Yar Tikhiy >Release: FreeBSD 7.0-CURRENT i386 >Organization: none >Environment: CURRENT, 7-STABLE. >Description: src/usr.bin/netstat/sctp.c tries to printf grammatically correct phrases by guessing singular or plural for counter names. However, some of the format strings are funny. Presumably they were mechanically generated and were not proofed afterwards. >How-To-Repeat: Note gems like "ho%st" or "%sctp" in what follows: yar@jujik:/usr/src/usr.bin/netstat$grep -n "%s[a-z]" sctp.c 552: p(sctps_recvivalkeyid, "\t\t%ju invalid %secret ids received\n"); 554: p(sctps_recvexpress, "\t\t%ju fa%st path receives all one chunk\n"); 555: p(sctps_recvexpressm, "\t\t%ju fa%st path multi-part data\n"); 563: p(sctps_sendretransdata, "\t\t%ju retran%smitted DATA chunks\n"); 564: p(sctps_sendfastretrans, "\t\t%ju fa%st retransmitted DATA chunks\n"); 577: p(sctps_pdrpfehos, "\t\t%ju from end ho%st\n"); 580: p(sctps_pdrpbwrpt, "\t\t%ju non-endho%st, bandwidth rep only\n"); 583: p(sctps_pdrppdbrk, "\t\t%ju where proce%ss_chunk_drop said break\n"); 585: p(sctps_pdrpdnfnd, "\t\t%ju attempt rever%se TSN lookup\n"); 586: p(sctps_pdrpdiwnp, "\t\t%ju e-ho%st confirms zero-rwnd\n"); 599: p(sctps_timosack, "\t\t%ju %sack timers fired\n"); 600: p(sctps_timoshutdown, "\t\t%ju %shutdown timers fired\n"); 606: p(sctps_timoshutdownack, "\t\t%ju %shutdown ack timers fired\n"); 607: p(sctps_timoshutdownguard, "\t\t%ju %shutdown guard timers fired\n"); 608: p(sctps_timostrmrst, "\t\t%ju %stream reset timers fired\n"); 612: p(sctps_timoassockill, "\t\t%ju a%soc free timers expired\n"); 619: p(sctps_earlyfrstart, "\t%ju TODO:%sctps_earlyfrstart\n"); 621: p(sctps_earlyfrmrkretrans, "\t%ju TODO:%sctps_earlyfrmrkretrans\n"); 622: p(sctps_earlyfrstpout, "\t%ju TODO:%sctps_earlyfrstpout\n"); 623: p(sctps_earlyfrstpidsck1, "\t%ju TODO:%sctps_earlyfrstpidsck1\n"); 624: p(sctps_earlyfrstpidsck2, "\t%ju TODO:%sctps_earlyfrstpidsck2\n"); 625: p(sctps_earlyfrstpidsck3, "\t%ju TODO:%sctps_earlyfrstpidsck3\n"); 626: p(sctps_earlyfrstpidsck4, "\t%ju TODO:%sctps_earlyfrstpidsck4\n"); 627: p(sctps_earlyfrstrid, "\t%ju TODO:%sctps_earlyfrstrid\n"); 628: p(sctps_earlyfrstrout, "\t%ju TODO:%sctps_earlyfrstrout\n"); 629: p(sctps_earlyfrstrtmr, "\t%ju TODO:%sctps_earlyfrstrtmr\n"); 635: p(sctps_hdrops, "\t%ju packet %shorter than header\n"); 636: p(sctps_badsum, "\t%ju check%sum error\n"); 644: p(sctps_markedretrans, "\t%ju TODO:%sctps_markedretrans\n"); 646: p(sctps_naglesent, "\t%ju RFC813 allowed %sending\n"); 648: p(sctps_maxburstqueued, "\t%ju max bur%st dosn't allow sending\n"); 662: p(sctps_vtagexpress, "\t%ju u%sed express lookup via vtag\n"); 663: p(sctps_vtagbogus, "\t%ju colli%sion in express lookup.\n"); 668: p(sctps_wu_sacks_sent, "\t%ju window update only %sacks sent\n"); 669: p(sctps_sends_with_flags, "\t%ju %sends with sinfo_flags !=0\n"); 670: p(sctps_sends_with_unord, "\t%ju unordered %sends\n"); 671: p(sctps_sends_with_eof, "\t%ju %sends with EOF flag set\n"); 672: p(sctps_sends_with_abort, "\t%ju %sends with ABORT flag set\n"); 678: p(sctps_cached_strmoq, "\t%ju cached %stream oq's used\n"); 679: p(sctps_left_abandon, "\t%ju unread me%ssage abandonded by close\n"); 680: p(sctps_send_burst_avoid, "\t%ju send bur%st avoidance, already " 683: "max bur%st inflight to net\n"); >Fix: Move the %s's to where plural suffixes actually should be in the phrases. >Release-Note: >Audit-Trail: >Unformatted: