mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 09:20:29 +00:00
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:
parent
f6cc903c0d
commit
d259b4aba2
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue