Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe97dfe

Browse files
committed
fix boost::network::uri::decode error - out of range because of '%'
1 parent95ec68e commitbe97dfe

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎boost/network/uri/decode.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,14 @@ OutputIterator decode(const InputIterator &in_begin,
5959
while (it != in_end) {
6060
if (*it =='%') {
6161
++it;
62+
if (it == in_end) {
63+
throwstd::runtime_error("decoding fail because of '%'");
64+
}
6265
value_type v0 =detail::letter_to_hex(*it);
6366
++it;
67+
if (it == in_end) {
68+
throwstd::runtime_error("decoding fail because of '%'");
69+
}
6470
value_type v1 =detail::letter_to_hex(*it);
6571
++it;
6672
*out++ =0x10 * v0 + v1;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp