This is the mail archive of the
glibc-linux@ricardo.ecn.wfu.edu
mailing list for the glibc project.
Re: bug in strlen
- To: glibc-linux at ricardo dot ecn dot wfu dot edu
- Subject: Re: bug in strlen
- From: Ronald de Man <deman at win dot tue dot nl>
- Date: Thu, 7 Sep 2000 14:34:28 +0200
- References: <CA256953.00373716.00@d73mta05.au.ibm.com>
- Reply-To: glibc-linux at ricardo dot ecn dot wfu dot edu
On Thu, Sep 07, 2000 at 03:18:39PM +0530, rashutos@in.ibm.com wrote:
> Hello,
>
> the strlen() function has a bug ... If you pass a NULL string to strlen(),
> the program crashes ... for NULL pointer dereference (SIGSEGV)
I very much doubt that this is a bug. Without checking the
standard, I'm pretty sure that the behavior of strlen() is
undefined when you pass it a NULL pointer.
Ronald