bin/52691: str[n][case]cmp may cause segmentation violation
with NULL pointers passed
des at ofug.org
Tue May 27 02:36:33 PDT 2003
Seva Gluschenko <gvs at 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.
Dag-Erling Smorgrav - des at ofug.org
More information about the freebsd-bugs