Copy data to beginning of buffer, not end. (#2542)
Copy data to beginning of buffer, not end.
This commit is contained in:
parent
0fc823041e
commit
494845b160
@ -1,3 +1,7 @@
|
||||
# 5.2.2
|
||||
- Bugfix
|
||||
- buffer overrun in tile plugin response handling
|
||||
|
||||
# 5.2.0
|
||||
Changes form 5.2.0 RC2
|
||||
- Bugfixes:
|
||||
|
@ -105,11 +105,10 @@ void RequestHandler::HandleRequest(const http::request ¤t_request, http::r
|
||||
else
|
||||
{
|
||||
BOOST_ASSERT(result.is<std::string>());
|
||||
current_reply.content.resize(current_reply.content.size() +
|
||||
result.get<std::string>().size());
|
||||
current_reply.content.resize(result.get<std::string>().size());
|
||||
std::copy(result.get<std::string>().cbegin(),
|
||||
result.get<std::string>().cend(),
|
||||
current_reply.content.end());
|
||||
current_reply.content.begin());
|
||||
|
||||
current_reply.headers.emplace_back("Content-Type", "application/x-protobuf");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user