
25 Aug
2009
25 Aug
'09
4:25 p.m.
Hi 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). Best regards, Alex