Zero out end-of-auxv

I haven’t actually thought extremely carefully about exactly which value
gets zeroed by the previously-mentioned loop, but it varies by one word,
so it’s wrong half the time.
This commit is contained in:
Jōshin 2024-05-06 16:34:58 -07:00
parent f6cc903c0d
commit d259b4aba2
No known key found for this signature in database

View file

@ -1069,7 +1069,7 @@ EXTERN_C __attribute__((__noreturn__)) void ApeLoader(long di, long *sp,
flags = (endp - 1) - sp + sp2;
flags[0] = AT_FLAGS;
flags[1] = literally * AT_FLAGS_PRESERVE_ARGV0;
/* end-of-auxv sentinel is zeroed by loop above */
flags[2] = 0; /* end-of-auxv sentinel */
}
sp = sp2;