From owner-freebsd-bugs@FreeBSD.ORG Mon Nov 2 01:10:03 2009 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 7FC481065693 for ; Mon, 2 Nov 2009 01:10:03 +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 6F0D08FC14 for ; Mon, 2 Nov 2009 01:10:03 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id nA21A333075252 for ; Mon, 2 Nov 2009 01:10:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id nA21A3TL075251; Mon, 2 Nov 2009 01:10:03 GMT (envelope-from gnats) Date: Mon, 2 Nov 2009 01:10:03 GMT Message-Id: <200911020110.nA21A3TL075251@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Garrett Cooper Cc: Subject: Re: bin/140151: Fix potential setlocale(3) in hexdump / od X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Garrett Cooper List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 01:10:03 -0000 The following reply was made to PR bin/140151; it has been noted by GNATS. From: Garrett Cooper To: Jilles Tjoelker Cc: bug-followup@freebsd.org Subject: Re: bin/140151: Fix potential setlocale(3) in hexdump / od Date: Sun, 1 Nov 2009 17:39:05 -0700 Hi Jilles! We discussed this earlier over IRC, but just to reiterate some points... On Sat, Oct 31, 2009 at 3:55 PM, Jilles Tjoelker wrote: > General policy across /bin and /usr/bin seems to ignore setlocale() > failures (usually caused by invalid/unsupported language settings). > I guess that's sensible, and in any case changing it for hexdump/od only > seems wrong. It's fine if hexdump is a start's this trend and core agrees, because it's been widely ported to other packages outside of FreeBSD, like util-linux-ng, etc. So, I'm just taking all of the issues and resolving them so that hexdump, et all has higher quality than it currently does, because QA in hexdump has been neglected in the past and it's a handy tool that should be more robust. Plus, it looks like a bad mark on the project when a piece of software has so many issues with segfaults, et all. If warnx(3) is appropriate for now until the rest of the commands in /bin and /usr/bin conform to the new standard (if that's the way we want to go longterm), I'll gladly change the patch to warnx(3). > There seems little wrong with the current way of determining hexdump vs > od either, which is to treat anything ending in 'od' as od. This is done because hd / od are hardlinks created when make install is run for hexdump, and they share a TON of common code (only the values set by the different usages differ -- the rest of the logic is equivalent). Thanks! -Garrett