summaryrefslogtreecommitdiff
path: root/Source/Core/Common/ArmCPUDetect.cpp
diff options
context:
space:
mode:
authorBrad Smith <brad@comstyle.com>2026-10-01 12:35:57 -0400
committerBrad Smith <brad@comstyle.com>2026-10-01 12:35:57 -0400
commitc636f1c87bd406e279748691729ecf279ef5f523 (patch)
tree6f038c1bcf7b2b08b0582b9e44695b41de4c1268 /Source/Core/Common/ArmCPUDetect.cpp
parentdbff13226c4143e0d48baf2f57284341002dabcf (diff)
ArmCPUDetect: check elf_aux_info() return value in ReadHwCap
Handle failure explicitly instead of relying on the initial value. No functional change.
Diffstat (limited to 'Source/Core/Common/ArmCPUDetect.cpp')
-rw-r--r--Source/Core/Common/ArmCPUDetect.cpp5
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
}