From 441c97e09bc9a381f9dd7ab3b585eeb9cede5e9e Mon Sep 17 00:00:00 2001 From: baldurk Date: Sun, 28 Sep 2014 18:47:03 +0100 Subject: [PATCH] [Refs #87: Static Analysis] Extra wchar_t for null terminator --- pdblocate/pdblocate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdblocate/pdblocate.cpp b/pdblocate/pdblocate.cpp index c8e7e3e25..6644397f2 100644 --- a/pdblocate/pdblocate.cpp +++ b/pdblocate/pdblocate.cpp @@ -403,7 +403,7 @@ wstring LookupModule(wstring moduleDetails) { wstring sympath = GetSymSearchPath(); - wchar_t path[MAX_PATH] = {0}; + wchar_t path[MAX_PATH+1] = {0}; BOOL found = dynSymFindFileInPathW(GetCurrentProcess(), sympath.c_str(), pdbName, &guid, age, 0, SSRVOPT_GUIDPTR, path, NULL, NULL); DWORD err = GetLastError();