summaryrefslogtreecommitdiff
path: root/src/user
diff options
context:
space:
mode:
Diffstat (limited to 'src/user')
-rw-r--r--src/user/app/testelf/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/user/app/testelf/main.c b/src/user/app/testelf/main.c
index a2e5932..0cbe56c 100644
--- a/src/user/app/testelf/main.c
+++ b/src/user/app/testelf/main.c
@@ -1,3 +1,4 @@
+#include <err.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
@@ -16,10 +17,10 @@ int main(int argc, char **argv) {
"I hope I won't get corrupted.\0";
char s[sizeof(s_d)];
memcpy(s, s_d, sizeof(s_d));
- const char *argv2[] = {argv[0], s, s, "hello", s, s, s, "lol", NULL};
+ const char *argv2[] = {"/bin/testelf", s, s, "hello", s, s, s, "lol", NULL};
printf("argv2 == %p, s == %p\n== exec ==\n", argv2, s);
- execv(argv[0], (void*)argv2);
- puts("stackexec failed");
+ execv((void*)argv2[0], (void*)argv2);
+ err(1, "execv");
}
return 0;
}