summaryrefslogtreecommitdiff
path: root/Source/Core/Common/HttpRequest.cpp
diff options
context:
space:
mode:
authorSilent <zdanio95@gmail.com>2019-06-23 20:06:45 +0200
committerSilent <zdanio95@gmail.com>2019-06-23 21:44:51 +0200
commit9eab3feddf0b3457cfe933532e0ed51834c6bb02 (patch)
treeb1b1942873a5ed29a37f2ab1b93b5cc5820280f8 /Source/Core/Common/HttpRequest.cpp
parent6c218110909003efdb1897a6b398cba37f16a58a (diff)
Fix out of bounds read in HttpRequest::Impl::Fetch logging
Diffstat (limited to 'Source/Core/Common/HttpRequest.cpp')
-rw-r--r--Source/Core/Common/HttpRequest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/HttpRequest.cpp b/Source/Core/Common/HttpRequest.cpp
index b26a120b32..34ab47a095 100644
--- a/Source/Core/Common/HttpRequest.cpp
+++ b/Source/Core/Common/HttpRequest.cpp
@@ -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 {};
}