Skip to content

Commit

Permalink
Fix read string out of range. (yedf2#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
mamil authored Jul 31, 2020
1 parent 73abba2 commit 59b5e1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handy/http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ HttpMsg::Result HttpRequest::tryDecode(Slice buf, bool copyBody) {
error("query uri '%.*s' should begin with /", (int) query_uri.size(), query_uri.data());
return Error;
}
for (size_t i = 0; i <= query_uri.size(); i++) {
for (size_t i = 0; i < query_uri.size(); i++) {
if (query_uri[i] == '?') {
uri = Slice(query_uri.data(), i);
Slice qs = Slice(query_uri.data() + i + 1, query_uri.size() - i - 1);
Expand Down

0 comments on commit 59b5e1c

Please sign in to comment.