Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

chenzhaoyu
Copy link

No description provided.

@@ -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);

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 if std::out_of_range is thrown? Would this be caught earlier/later?

Copy link
Author

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~

Copy link
Member

@deanberris deanberris left a 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!

@deanberris deanberris merged commit 1277fa6 into cpp-netlib:0.13-release Dec 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants