Use unsigned type in percent_encoding to prevent overflow for %80..%ff
Related fix in Boost.Spirit https://github.com/boostorg/spirit/commit/80414bc68868b27e1fd865cbbbc1a6db229825a5
This commit is contained in:
committed by
Patrick Niklaus
parent
55cc06fd8b
commit
a8f3474996
@@ -27,7 +27,8 @@ struct URLParser final : qi::grammar<Iterator, Into>
|
||||
using boost::spirit::repository::qi::iter_pos;
|
||||
|
||||
alpha_numeral = qi::char_("a-zA-Z0-9");
|
||||
percent_encoding = qi::char_('%') > qi::uint_parser<char, 16, 2, 2>()[qi::_val = qi::_1];
|
||||
percent_encoding =
|
||||
qi::char_('%') > qi::uint_parser<unsigned char, 16, 2, 2>()[qi::_val = qi::_1];
|
||||
polyline_chars = qi::char_("a-zA-Z0-9_.--[]{}@?|\\~`^") | percent_encoding;
|
||||
all_chars = polyline_chars | qi::char_("=,;:&().");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user