Make static analysis happy about the length of patternBuf
[folly.git] / folly / portability / Dirent.cpp
index 5c75a2003a4a13509593e94d4de546a976d57ff8..5c01eb829955435063c42cadd84ae75d5408e851 100755 (executable)
@@ -34,7 +34,7 @@ struct DIR {
   }
 
   DIR* open() {
-    wchar_t patternBuf[MAX_PATH + 2];
+    wchar_t patternBuf[MAX_PATH + 3];
     size_t len;
 
     if (mbstowcs_s(&len, patternBuf, MAX_PATH, pattern.c_str(), MAX_PATH - 2)) {