flock locks in folly::File, FileUtil, Exception.h fixes and tests
[folly.git] / folly / test / SubprocessTest.cpp
index bcb163a343c90951e27823f3862d45a56a790654..17c145d177e93d913d311edae0a3996651cd6a7b 100644 (file)
@@ -67,7 +67,7 @@ TEST(SimpleSubprocessTest, ShellExitsWithError) {
 TEST(ParentDeathSubprocessTest, ParentDeathSignal) {
   // Find out where we are.
   static constexpr size_t pathLength = 2048;
-  char buf[pathLength];
+  char buf[pathLength + 1];
   int r = readlink("/proc/self/exe", buf, pathLength);
   CHECK_ERR(r);
   buf[r] = '\0';