From: Rich Felker Date: Tue, 14 Mar 2017 18:29:50 +0000 (-0400) Subject: in static dl_iterate_phdr, fix use of possibly-uninitialized aux data X-Git-Tag: v1.1.17~96 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=500f5bee6c03981961f1586fca2a1dee6fdce7c7;p=oweals%2Fmusl.git 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. --- diff --git a/src/ldso/dl_iterate_phdr.c b/src/ldso/dl_iterate_phdr.c index c141fd9b..e55cbf76 100644 --- a/src/ldso/dl_iterate_phdr.c +++ b/src/ldso/dl_iterate_phdr.c @@ -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]