This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: basic_string termination failure in libstdc++
- To: jstern at citilink dot com, oliva at dcc dot unicamp dot br
- Subject: Re: basic_string termination failure in libstdc++
- From: Josh Stern <jstern at citilink dot com>
- Date: Mon, 22 Feb 1999 02:49:37 -0600 (CST)
- Cc: egcs-bugs at egcs dot cygnus dot com
- Posted-Date: Mon, 22 Feb 1999 02:49:37 -0600 (CST)
>> 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