mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-03-28 14:56:24 +01:00
fix a buffer overrun bug in steam_http where the buffer size wasn't set correctly
This commit is contained in:
parent
587e629df9
commit
ed1eec0983
1 changed files with 2 additions and 1 deletions
|
@ -347,7 +347,8 @@ void Steam_HTTP::online_http_request(Steam_Http_Request *request, SteamAPICall_t
|
|||
|
||||
unsigned int file_size = file_size_(request->target_filepath);
|
||||
if (file_size) {
|
||||
long long read = Local_Storage::get_file_data(request->target_filepath, (char *)&request->response[0], file_size, 0);
|
||||
request->response.resize(static_cast<size_t>(file_size));
|
||||
long long read = Local_Storage::get_file_data(request->target_filepath, (char *)&request->response[0], file_size);
|
||||
if (read < 0) read = 0;
|
||||
request->response.resize(static_cast<size_t>(read));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue