This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Calling strcmp/strncmp/strcasecmp/strncasecmp with NULL parameter


On Tuesday 17 August 2004 21:16, you wrote:
> [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.
> 

Well changing the code isn't so easy because i came accross this when 
debugging a third party library. The manpages do not say anything that 
calling these functions with illegal arguments will result in undefined 
behaviour. Maybe you can add it.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]