[v3] Fix stringbuf handling of NUL characters

Phil Edwards pedwards@disaster.jaj.com
Thu Jul 12 13:04:00 GMT 2001


On Thu, Jul 12, 2001 at 11:04:42AM -0500, Benjamin Kosnik wrote:
> 
> Hmm. Can I see a testcase entry for this?

I said that I wouldn't check anything until I had constructed one; for an
example of breakage take a look at the original bug report:

    http://gcc.gnu.org/ml/gcc-bugs/2001-07/msg00155.html

The final value should be the same as the input value, but it contains a
zero byte, and that's where the stringbuf stops.

This will be the basis for an actual testsuite entry, but I'm just now
getting to a computer to start working.  So it'll be tonight/tomorrow
before I post a working test.


Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC



More information about the Libstdc++ mailing list