Date: Mon, 2 Nov 2009 01:10:04 GMT From: Garrett Cooper <gcooper@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/140151: Fix potential setlocale(3) in hexdump / od Message-ID: <200911020110.nA21A4Ma075277@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/140151; it has been noted by GNATS. From: Garrett Cooper <gcooper@FreeBSD.org> To: Garrett Cooper <gcooper@freebsd.org> Cc: Jilles Tjoelker <jilles@stack.nl>, bug-followup@freebsd.org Subject: Re: bin/140151: Fix potential setlocale(3) in hexdump / od Date: Sun, 1 Nov 2009 17:39:49 -0700 On Sun, Nov 1, 2009 at 5:39 PM, Garrett Cooper <gcooper@freebsd.org> wrote: > Hi Jilles! > =A0 =A0We discussed this earlier over IRC, but just to reiterate some poi= nts... > > On Sat, Oct 31, 2009 at 3:55 PM, Jilles Tjoelker <jilles@stack.nl> 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. > > =A0 =A0It's fine if hexdump is a start's this trend and core agrees, I meant to say `It's fine if hexdump starts 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. > =A0 =A0If 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. > > =A0 =A0This 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).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911020110.nA21A4Ma075277>