SegFault by using strcmp

chenk k.chen@eos-it-services.com
Thu Jul 26 16:01:00 GMT 2007


Hi,

I know, wenn man uses strcmp(const char* s1, const char* s2), Null pointer
values for s1 and s2
are treated the same as pointers to empty strings.

But I can only get SegFault in my application, because s1 or s2  sometimes
may be NULL. 

I am using  g++ version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4),
               glibc-2.3.4-2
               libstdc++-v3
               auf AMD86-64

Is it a bug?

Thanks



-- 
View this message in context: http://www.nabble.com/SegFault-by-using-strcmp-tf4152553.html#a11813540
Sent from the gcc - bugs mailing list archive at Nabble.com.



More information about the Gcc-bugs mailing list