Boost logo

Boost :

Subject: Re: [boost] [1.48 lexical_cast] Illegal Derefence
From: Antony Polukhin (antoshkka_at_[hidden])
Date: 2011-11-02 12:44:16


2011/11/2 Olaf van der Spek <ml_at_[hidden]>:
> Hi,
>
> This does an illegal dereference in boost\lexical_cast.hpp(1357): if (
> Traits::eq(minus,*start) )
>
> #include <boost/lexical_cast.hpp>
> #include <boost/range/iterator_range.hpp>
>
> int main()
> {
>        boost::iterator_range<const char*> v;
>        boost::lexical_cast<int>(v);
> }

Thanks a lot for this bug report.

I tried this code with 1.42 version (it failed with an assertion),
trunk (sigfault), release/branch(sigfault) and with 1.46
(bad_lexical_cast exception). It is an old bug and if this bug is not
critical for you, I think it can wait till next release (1.49).

I`ll create a ticket with bug description.

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