From f619b21d0f42dfef1c82f4d4f0187ed5b563d69e Mon Sep 17 00:00:00 2001 From: Peter Holm Date: Mon, 15 Mar 2021 12:00:01 +0100 Subject: [PATCH] stress2: Fix usage of unitializer data --- tools/test/stress2/misc/setuid.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/setuid.sh b/tools/test/stress2/misc/setuid.sh index 4703ffe68e7..770c20366f7 100755 --- a/tools/test/stress2/misc/setuid.sh +++ b/tools/test/stress2/misc/setuid.sh @@ -86,7 +86,7 @@ EOF int main(int argc, char **argv) { - char *av[4]; + char *av[2]; int fd; if (argc == 1) @@ -112,9 +112,8 @@ main(int argc, char **argv) if (chdir("/") != 0) err(1, "chdir"); - av[0] = "nop"; - av[1] = "nop"; - av[3] = 0; + av[0] = "/nop"; + av[1] = 0; if (execve(av[0], av, NULL) == -1) err(1, "execve");