Skip to content

Commit

Permalink
LibC: execl() forgot to add the null sentinel to argv.
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomekling committed Feb 7, 2019
1 parent f4bce03 commit 2ac697c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LibC/unistd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int execl(const char* filename, const char* arg0, ...)
args.append(arg);
}
va_end(ap);

args.append(nullptr);
return execve(filename, (char* const *)args.data(), nullptr);
}

Expand Down

0 comments on commit 2ac697c

Please sign in to comment.