git: f619b21d0f42 - main - stress2: Fix usage of unitializer data

Peter Holm pho at FreeBSD.org
Mon Mar 15 11:02:09 UTC 2021


The branch main has been updated by pho:

URL: https://cgit.FreeBSD.org/src/commit/?id=f619b21d0f42dfef1c82f4d4f0187ed5b563d69e

commit f619b21d0f42dfef1c82f4d4f0187ed5b563d69e
Author:     Peter Holm <pho at FreeBSD.org>
AuthorDate: 2021-03-15 11:00:01 +0000
Commit:     Peter Holm <pho at FreeBSD.org>
CommitDate: 2021-03-15 11:00:01 +0000

    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 4703ffe68e77..770c20366f7d 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");
 


More information about the dev-commits-src-all mailing list