Boost logo

Boost :

Subject: Re: [boost] Bug in lexertl library (in Spirit)
From: Hartmut Kaiser (hartmut.kaiser_at_[hidden])
Date: 2009-08-25 18:08:20

> There is a bug in the lexertl library. This library is being used in
> spirit but being prepared for submission to boost as a separate
> library.
> The file consts.hpp contains the lines:
> const std::size_t num_wchar_ts =
> (boost::integer_traits<wchar_t>::const_max < 0x110000) ?
> boost::integer_traits<wchar_t>::const_max: 0x110000;
> Which should be:
> const std::size_t num_wchar_ts =
> (boost::integer_traits<wchar_t>::const_max + 1 < 0x110000) ?
> boost::integer_traits<wchar_t>::const_max + 1: 0x110000;
> Currently the lexer will cause a buffer overflow parsing a 0xffff value
> in a wchar_t buffer (assuming sizeof(wchar_t) is 2).

Thanks for the report. I forwarded this message to Ben (Hanson) since I
don't know if he is watching the Boost list right now. Let's see what he

Regards Hartmut

Boost list run by bdawes at, gregod at, cpdaniel at, john at