From 42ee5b9264b4b8ad745be9d337516509f0ab5f81 Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Tue, 18 Nov 2025 10:40:48 -0800 Subject: [PATCH] Fix overread asan error of brand_string - Brand string is 3 rows of cpuid which is 48 bytes. - Allow for CPUINFO_PACKAGE_NAME_MAX to be 64 bytes for benefit of Oryon --- src/x86/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/x86/init.c b/src/x86/init.c index adc5d361..b2d27631 100644 --- a/src/x86/init.c +++ b/src/x86/init.c @@ -72,7 +72,7 @@ void cpuinfo_x86_init_processor(struct cpuinfo_x86_processor* processor) { for (uint32_t i = 0; i < 3; i++) { brand_string[i] = cpuid(UINT32_C(0x80000002) + i); } - memcpy(processor->brand_string, brand_string, sizeof(processor->brand_string)); + memcpy(processor->brand_string, brand_string, sizeof(brand_string)); cpuinfo_log_debug("raw CPUID brand string: \"%48s\"", processor->brand_string); } }