summaryrefslogtreecommitdiff
path: root/src/user/app/testelf/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/app/testelf/main.c')
-rw-r--r--src/user/app/testelf/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/user/app/testelf/main.c b/src/user/app/testelf/main.c
index 5608cc7..a2e5932 100644
--- a/src/user/app/testelf/main.c
+++ b/src/user/app/testelf/main.c
@@ -10,7 +10,7 @@ int main(int argc, char **argv) {
printf("argc == %u\n", argc);
for (int i = 0; i < argc; i++)
printf("argv[%u] == %p == \"%s\"\n", i, argv[i], argv[i]);
- if (strcmp(argv[1], "stackexec") == 0) {
+ if (argv[1] && strcmp(argv[1], "stackexec") == 0) {
/* exec something with arguments on the stack */
const char s_d[] = "I am a pretty long string on the stack. Oh my. " \
"I hope I won't get corrupted.\0";