Fix out of bounds read in HttpRequest::Impl::Fetch logging

This commit is contained in:
Silent 2019-06-23 20:06:45 +02:00
parent 6c21811090
commit 9eab3feddf
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 2 additions and 2 deletions

View File

@ -221,8 +221,8 @@ HttpRequest::Response HttpRequest::Impl::Fetch(const std::string& url, Method me
curl_easy_getinfo(m_curl.get(), CURLINFO_RESPONSE_CODE, &response_code);
if (response_code != 200)
{
ERROR_LOG(COMMON, "Failed to %s %s: server replied with code %li and body\n\x1b[0m%s", type,
url.c_str(), response_code, buffer.data());
ERROR_LOG(COMMON, "Failed to %s %s: server replied with code %li and body\n\x1b[0m%.*s", type,
url.c_str(), response_code, static_cast<int>(buffer.size()), buffer.data());
return {};
}