- Notifications
You must be signed in to change notification settings - Fork425
add client size close for 0.13-release#719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
add client size close for 0.13-release#719
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -266,6 +270,10 @@ struct http_async_protocol_handler { | |||
} | |||
trim(header_pair.second); | |||
headers.insert(header_pair); | |||
if (boost::iequals(header_pair.first, "Content-Length")) { | |||
is_content_length = true; | |||
content_length = std::stoi(header_pair.second); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
std::stoi(maliciously large amount)
And what ifstd::out_of_range
is thrown? Would this be caught earlier/later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Any Content-Length greater than or equal to zero is a valid value.If Content-Length is larger than long long , I will ignore to handle it.Please check again,thanks~
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM -- thanks@chenzhaoyu and@anonimal for the review!
No description provided.