This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


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

Re: basic_string termination failure in libstdc++


>> 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




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