Boost logo

Boost :

Subject: Re: [boost] [1.48 lexical_cast] Illegal Derefence
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2011-11-02 13:09:36


Fast solution will be:

@@ -1144,6 +1144,7 @@
             bool shl_input_streamable(InputStreamable& input)
             {
                 std::basic_ostream<CharT> stream(&stringbuffer);
+ stream << '\0'; // Force stringbuffer initialization
                 bool const result = !(stream << input).fail();
                 start = stringbuffer.pbase();
                 finish = stringbuffer.pptr();

This patch replaces Segmentation Fault with bad_lexical_cast exception.

OK to merge to trunk?

Best regards,
Antony Polukhin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk