mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
in static dl_iterate_phdr, fix use of possibly-uninitialized aux data
this could only happen if an incomplete auxv was passed into the program, but it's better to just initialize the data anyway.
This commit is contained in:
parent
6582baa752
commit
500f5bee6c
1 changed files with 1 additions and 1 deletions
|
@ -11,7 +11,7 @@ static int static_dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size
|
|||
size_t base = 0;
|
||||
size_t n;
|
||||
struct dl_phdr_info info;
|
||||
size_t i, aux[AUX_CNT];
|
||||
size_t i, aux[AUX_CNT] = {0};
|
||||
|
||||
for (i=0; libc.auxv[i]; i+=2)
|
||||
if (libc.auxv[i]<AUX_CNT) aux[libc.auxv[i]] = libc.auxv[i+1];
|
||||
|
|
Loading…
Add table
Reference in a new issue