bin/52691: str[n][case]cmp may cause segmentation violationwith NULL pointers passed

Tony Finch dot at dotat.at
Tue May 27 06:58:10 PDT 2003


Seva Gluschenko <gvs at 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 at 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.


More information about the freebsd-bugs mailing list