mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 11:15:34 +08: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
@ -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…
Reference in New Issue
Block a user