This is the mail archive of the
mailing list for the glibc project.
Re: Calling strcmp/strncmp/strcasecmp/strncasecmp with NULL parameter
- From: Petter Reinholdtsen <pere at hungry dot com>
- To: Steven Keuchel <steven dot keuchel at freenet dot de>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Tue, 17 Aug 2004 23:16:32 +0200
- Subject: Re: Calling strcmp/strncmp/strcasecmp/strncasecmp with NULL parameter
- Bcc: Petter Reinholdtsen <petter dot reinholdtsen at usit dot uio dot no>
- References: <firstname.lastname@example.org>
> What does the C Standard say about this ?
I suggest you have a look at
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.