basic_string termination failure in libstdc++

Josh Stern jstern@citilink.com
Sun Feb 28 23:30:00 GMT 1999


>> I've experienced bugs in several pieces of C++ code where      
>> a basic_string<char> was not properly terminated with a '\0'             

>It doesn't have to, as it keeps track of its size out-of-band.  Maybe     
>you're calling data() where you should be calling c_str(), or just    
>assuming that strings are null terminated?    

You must be right.

- Josh





More information about the Gcc-bugs mailing list