From b99f54b9f438c33e61c513183191228dab4934c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sat, 21 Dec 2024 20:23:18 +0800 Subject: [PATCH] CPU (NetBSD): trim CPU vendor --- src/detection/cpu/cpu_nbsd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/detection/cpu/cpu_nbsd.c b/src/detection/cpu/cpu_nbsd.c index 17ce880df..c850766da 100644 --- a/src/detection/cpu/cpu_nbsd.c +++ b/src/detection/cpu/cpu_nbsd.c @@ -48,7 +48,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) return "sysctlbyname(machdep.cpu_brand) failed"; } - ffSysctlGetString("machdep.dmi.processor-vendor", &cpu->vendor); + if (ffSysctlGetString("machdep.dmi.processor-vendor", &cpu->vendor) == NULL) + ffStrbufTrimRightSpace(&cpu->vendor); cpu->coresPhysical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1); cpu->coresLogical = cpu->coresPhysical;