Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2003 11:36:29 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Seva Gluschenko <gvs@rinet.ru>
Cc:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/52691: str[n][case]cmp may cause segmentation violation with NULL pointers passed
Message-ID:  <xzp1xyk20ki.fsf@flood.ping.uio.no>
In-Reply-To: <20030527121942.W33922@road.demos.su> (Seva Gluschenko's message of "Tue, 27 May 2003 12:20:37 %2B0400 (MSD)")
References:  <200305262053.h4QKr3GB026031@freefall.freebsd.org> <20030527121942.W33922@road.demos.su>

next in thread | previous in thread | raw e-mail | index | archive | help
Seva Gluschenko <gvs@rinet.ru> writes:
> Message of Dag-Erling Smorgrav at May 26 13:53 ...
> > The bug is in the application that passes NULL to strcmp.
> Well, sir, can you please quote me some ISO C89 or another standard
> which allows str*cmp not to care about NULL pointers?

The behaviour of the str*() functions is only defined when the
pointers passed to them point to strings.  NULL is not a string
pointer.  If you disagree, the correct venue to discuss this is
comp.lang.c.std, not the FreeBSD PR database.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzp1xyk20ki.fsf>