mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-20 06:00:58 +00:00
Avoid an unlikely buffer overflow.
This commit is contained in:
parent
1b1a8cef02
commit
093255a895
@ -346,7 +346,7 @@ void GetSysDirectories(std::string &memstickpath, std::string &flash0path) {
|
||||
char memstickpath_buf[_MAX_PATH];
|
||||
char flash0path_buf[_MAX_PATH];
|
||||
|
||||
GetModuleFileName(NULL, path_buffer, sizeof(path_buffer));
|
||||
GetModuleFileName(NULL, path_buffer, ARRAY_SIZE(path_buffer));
|
||||
|
||||
std::string path = ConvertWStringToUTF8(path_buffer);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user