bin/140151: Fix potential setlocale(3) in hexdump / od
Garrett Cooper
gcooper at FreeBSD.org
Mon Nov 2 01:10:05 UTC 2009
The following reply was made to PR bin/140151; it has been noted by GNATS.
From: Garrett Cooper <gcooper at FreeBSD.org>
To: Garrett Cooper <gcooper at freebsd.org>
Cc: Jilles Tjoelker <jilles at stack.nl>, bug-followup at 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 at 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 at 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).
More information about the freebsd-bugs
mailing list