From 38f4215a941e7febe6f46a3cee8065c2e7039f45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Tue, 16 Sep 2025 10:54:20 +0800 Subject: [PATCH] CPU (Windows): trims vendor string read from registry --- src/detection/cpu/cpu_windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/cpu/cpu_windows.c b/src/detection/cpu/cpu_windows.c index d5c7f843f..d742a702c 100644 --- a/src/detection/cpu/cpu_windows.c +++ b/src/detection/cpu/cpu_windows.c @@ -242,7 +242,8 @@ static const char* detectByRegistry(FFCPUResult* cpu) return "ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L\"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\", &hKey, NULL) failed"; ffRegReadStrbuf(hKey, L"ProcessorNameString", &cpu->name, NULL); - ffRegReadStrbuf(hKey, L"VendorIdentifier", &cpu->vendor, NULL); + if (ffRegReadStrbuf(hKey, L"VendorIdentifier", &cpu->vendor, NULL)) + ffStrbufTrimRightSpace(&cpu->vendor); if (cpu->coresLogical == 0) {