GetZipCdir: prevent integer underflow. posix_spawn_test.c: stop attempting to load zipos from /usr/bin/ape. (#758)

This commit is contained in:
Gavin Hayes 2023-03-05 17:29:38 -05:00 committed by GitHub
parent 22fcab131c
commit c5de653b98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View file

@ -51,7 +51,7 @@ __attribute__((__constructor__)) static void init(void) {
TEST(posix_spawn, test) {
int rc, ws, pid;
char *prog = GetProgramExecutableName();
char *args[] = {program_invocation_name, NULL};
char *args[] = {prog, NULL};
char *envs[] = {"THE_DOGE=42", NULL};
EXPECT_EQ(0, posix_spawn(&pid, prog, NULL, NULL, args, envs));
EXPECT_NE(-1, waitpid(pid, &ws, 0));