Fixed non-NULL terminating array bug in SanitizerCommon.StartSubprocessTest that...
authorZia Ansari <zia.ansari@intel.com>
Mon, 15 Feb 2016 05:11:51 +0000 (05:11 +0000)
committerZia Ansari <zia.ansari@intel.com>
Mon, 15 Feb 2016 05:11:51 +0000 (05:11 +0000)
Differential Revision: http://reviews.llvm.org/D17228

llvm-svn: 260876

compiler-rt/lib/sanitizer_common/tests/sanitizer_linux_test.cc

index 277d14e..fb6b109 100644 (file)
@@ -271,7 +271,7 @@ TEST(SanitizerCommon, StartSubprocessTest) {
 #else
   const char *shell = "/bin/sh";
 #endif
-  const char *argv[] = {shell, "-c", "echo -n 'hello'"};
+  const char *argv[] = {shell, "-c", "echo -n 'hello'", (char *)NULL};
   int pid = StartSubprocess(shell, argv,
                             /* stdin */ kInvalidFd, /* stdout */ pipe_fds[1]);
   ASSERT_GT(pid, 0);