Commit 3de98332 authored by Nils Goroll's avatar Nils Goroll Committed by Dridi Boukelmoune

vtest: put cwd on the stack

0051cbe3 did not work on
solaris-descendents, the man page clearly states that the size argument
also determines the buffer to be malloc()ed for a NULL buffer argument.
parent e993bda6
......@@ -540,6 +540,7 @@ main(int argc, char * const *argv)
int ntest = 1; /* Run tests this many times */
uintmax_t bufsiz;
const char *p;
char buf[PATH_MAX];
argv0 = strrchr(argv[0], '/');
if (argv0 == NULL)
......@@ -552,7 +553,7 @@ main(int argc, char * const *argv)
else
tmppath = strdup("/tmp");
cwd = getcwd(NULL, 0);
cwd = getcwd(buf, sizeof buf);
extmacro_def("pwd", "%s", cwd);
vmod_path = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment