Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2003 14:58:08 +0100
From:      Tony Finch <dot@dotat.at>
To:        gvs@rinet.ru
Cc:        freebsd-bugs@freebsd.org
Subject:   Re: bin/52691: str[n][case]cmp may cause segmentation violationwith NULL pointers passed
Message-ID:  <E19Kexs-0003PR-00@chiark.greenend.org.uk>
In-Reply-To: <20030527121942.W33922@road.demos.su>
References:  <200305262053.h4QKr3GB026031@freefall.freebsd.org> <200305262053.h4QKr3GB026031@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Seva Gluschenko <gvs@rinet.ru> wrote:
>
>Well, sir, can you please quote me some ISO C89 or another standard
>which allows str*cmp not to care about NULL pointers?

ISO/IEC 9899:1990 says in section 7.1.7 Use of library functions:
"If an argument to a function has an invalid value (such as a value
outside the domain of the function, or a pointer outside the address
space of the program, or a null pointer), the behaviour is undefined."

Tony.
-- 
f.a.n.finch  <dot@dotat.at>  http://dotat.at/
COLWYN BAY TO THE MULL OF GALLOWAY INCLUDING THE ISLE OF MAN: SOUTHEAST 2 OR 3
INCREASING SOUTHWEST 3 OR 4, LOCALLY 5 FOR A TIME. PATCHY RAIN AND DRIZZLE
WITH MIST PATCHES. MODERATE. SLIGHT.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E19Kexs-0003PR-00>