Merge pull request #14903 from brad0/elf_aux_info_check

ArmCPUDetect: check elf_aux_info() return value in ReadHwCap
This commit is contained in:
JosJuice
2026-10-31 16:10:02 +01:00
committed by GitHub

View File

@@ -154,8 +154,9 @@ static u32 ReadHwCap(u32 type)
#if defined(__linux__)
return getauxval(type);
#elif defined(HAVE_ELF_AUX_INFO)
u_long hwcap = 0;
elf_aux_info(type, &hwcap, sizeof(hwcap));
u_long hwcap;
if (elf_aux_info(type, &hwcap, sizeof(hwcap)) != 0)
hwcap = 0;
return hwcap;
#endif
}