coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: That '[' file in /usr/bin


From: Mike Frysinger
Subject: Re: That '[' file in /usr/bin
Date: Sun, 3 Mar 2013 18:11:40 -0500
User-agent: KMail/1.13.7 (Linux/3.7.6; KDE/4.6.5; x86_64; ; )

On Sunday 03 March 2013 14:03:24 H. Peter Anvin wrote:
> On 03/03/2013 02:53 AM, Pádraig Brady wrote:
> >> personally, i find it a bit ironic that a lot of GNU apps (including
> >> coreutils) simply abort() themselves when argv[0]==NULL considering the
> >> project's hard line position about not relying on argv[0] for behavior.
> > 
> > This issue was mentioned here:
> > http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00215.html
> > 
> > The problem with avoiding the aborts is that NULL is only
> > one of many invalid values for argv[0]
> 
> Come again?
> 
> You can't seriously say that checking for a null pointer or an invalid
> string (for whatever definition of "valid" you happen to have) is hard.

he's saying that, why special case NULL if we think this scenario is invalid.  
a pointer of argv[0] = 1 will crash just as hard.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]