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]

Calling strcmp/strncmp/strcasecmp/strncasecmp with NULL parameter


Hi there,

in the not so unlikely event, that one of the string compare functions is 
called with NULL as one parameter the process will get a SIGSEGV, because the 
functions are dereferencing NULL pointers (i'm referring to the funcs found 
in sysdeps/generic). I doubt this is intended behaviour, IMHO these function 
should not fail, no matter what the input is.

What does the C Standard say about this ?

Best regards,
   Steven Keuchel

Attachment: pgp00000.pgp
Description: PGP signature


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