Index: third_party/crashpad/crashpad/test/paths_win.cc |
diff --git a/third_party/crashpad/crashpad/test/paths_win.cc b/third_party/crashpad/crashpad/test/paths_win.cc |
index 95d0264ed82ab36cf0e541315528d44585f4bbb8..947acd5cce951ca54d4aff8582877eb98a0489fa 100644 |
--- a/third_party/crashpad/crashpad/test/paths_win.cc |
+++ b/third_party/crashpad/crashpad/test/paths_win.cc |
@@ -16,13 +16,17 @@ |
#include <windows.h> |
+#include "base/logging.h" |
+ |
namespace crashpad { |
namespace test { |
// static |
base::FilePath Paths::Executable() { |
wchar_t executable_path[_MAX_PATH]; |
- GetModuleFileName(nullptr, executable_path, sizeof(executable_path)); |
+ unsigned int len = |
+ GetModuleFileName(nullptr, executable_path, arraysize(executable_path)); |
+ PCHECK(len != 0 && len < arraysize(executable_path)) << "GetModuleFileName"; |
return base::FilePath(executable_path); |
} |