Re: [PATCH] libelf: Set dst to zero on failure in __elf_getphdrnum_rdlock

2020-11-06 Thread Mark Wielaard
On Sun, 2020-11-01 at 19:42 +0100, Mark Wielaard wrote: > GCC with -flto finds some (very) unlikely error paths. It flags callers > of __elf_getphdrnum_chk_rdlock with *dst not yet set because an internal > call to __elf_getphdrnum_rdlock might not initialize *dst either in one > particular failure

[PATCH] libelf: Set dst to zero on failure in __elf_getphdrnum_rdlock

2020-11-01 Thread Mark Wielaard
GCC with -flto finds some (very) unlikely error paths. It flags callers of __elf_getphdrnum_chk_rdlock with *dst not yet set because an internal call to __elf_getphdrnum_rdlock might not initialize *dst either in one particular failure path. The sanity check that __elf_getphdrnum_chk_rdlock then pe