From c636f1c87bd406e279748691729ecf279ef5f523 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 1 Oct 2026 12:35:57 -0400 Subject: ArmCPUDetect: check elf_aux_info() return value in ReadHwCap Handle failure explicitly instead of relying on the initial value. No functional change. --- Source/Core/Common/ArmCPUDetect.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source/Core/Common/ArmCPUDetect.cpp') 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 } -- cgit v1.2.3