Calling strcmp/strncmp/strcasecmp/strncasecmp with NULL parameter
Petter Reinholdtsen
pere@hungry.com
Tue Aug 17 21:16:00 GMT 2004
[Steven Keuchel]
> What does the C Standard say about this ?
I suggest you have a look at
<URL:http://www.opengroup.org/onlinepubs/009695399/toc.htm>, and
discover that the standard consider it undefined behaviour to call for
example strcmp() with illegal arguments. The code calling strcmp()
like this is broken, and need to be fixed.
More information about the Libc-alpha
mailing list