diff options
| author | JosJuice <josjuice@gmail.com> | 2026-10-31 16:10:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-10-31 16:10:02 +0100 |
| commit | 34746347b7521b0bcda3e35eefd6d0f3de2be4d0 (patch) | |
| tree | 17da551bb7269498ebc324753153e3e184d52ddc /Source/Core/Common | |
| parent | 1f3086790122c49a7cda4ba04318dae568ab52f9 (diff) | |
| parent | c636f1c87bd406e279748691729ecf279ef5f523 (diff) | |
Merge pull request #14903 from brad0/elf_aux_info_check
ArmCPUDetect: check elf_aux_info() return value in ReadHwCap
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/ArmCPUDetect.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/Common/ArmCPUDetect.cpp b/Source/Core/Common/ArmCPUDetect.cpp index 91b66f807f..fa90b8d2f5 100644 --- a/Source/Core/Common/ArmCPUDetect.cpp +++ b/Source/Core/Common/ArmCPUDetect.cpp @@ -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 } |
