From 093255a89534f3318aa7713124b59d9a6ca4e762 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 5 Oct 2013 10:17:46 -0700 Subject: [PATCH] Avoid an unlikely buffer overflow. --- Core/System.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/System.cpp b/Core/System.cpp index 1e84d483a2..ca39a6b6a1 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -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);