From: mh@mike.franken.de (Michael Hirmke)
Subject: Re: strlen on a NULL
14 May 1998 10:21:16 -0700
Message-ID: <6tl3-Ka4pfB.cygnus.gnu-win32@mike.franken.de>
References: <H00000b00005bfcb@MHS>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: gnu-win32@cygnus.com

Valery Fine [fine@bnl.gov] wrote:

>On 12 May 98 at 13:42, Kjeld.F.Christensen@dxd.erics wrote:
>
>> On NT your process may lie anywhere, but never in ZERO, Thus you are
>> not permitted to read from adress NULL. (You are not allowed to
>> snoop around in the interrupt vetors!)
>
>  Some int strlen(char *s) is started with
>
>  int strlen(char *s){
>   if (s==0) return 0;
                     ^
                     *This is really incorrect behaviour* !
                     Nothing also doesn't have length of zero.
                     If the function can handle zero pointers,
                     the only correct behaviour AFAIK is to
                     return -1 and set "errno" as appropriate.
>   . . .
>  }
>
>  but not all.

Bye.
Michael.
--
Michael Hirmke           | Telefon +49 (911) 557999
Georg-Strobel-Strasse 81 | FAX     +49 (911) 557664
90489 Nuernberg          | E-Mail  mailto:mh@mike.franken.de
                         | WWW     http://minimike.franken.de/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
