Skip to content

Commit 38f4215

Browse files
committed
CPU (Windows): trims vendor string read from registry
1 parent e3eec3f commit 38f4215

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/detection/cpu/cpu_windows.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ static const char* detectByRegistry(FFCPUResult* cpu)
242242
return "ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L\"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\", &hKey, NULL) failed";
243243

244244
ffRegReadStrbuf(hKey, L"ProcessorNameString", &cpu->name, NULL);
245-
ffRegReadStrbuf(hKey, L"VendorIdentifier", &cpu->vendor, NULL);
245+
if (ffRegReadStrbuf(hKey, L"VendorIdentifier", &cpu->vendor, NULL))
246+
ffStrbufTrimRightSpace(&cpu->vendor);
246247

247248
if (cpu->coresLogical == 0)
248249
{

0 commit comments

Comments
 (0)