From 0605cb754ba2ecdae7a8560e86e75363c38a8a38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Sun, 6 Nov 2022 14:55:41 +0800 Subject: [PATCH] OS: fix Windows 7 detection --- src/detection/os/os_windows.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/detection/os/os_windows.cpp b/src/detection/os/os_windows.cpp index e28607c9c..5bd9d11c5 100644 --- a/src/detection/os/os_windows.cpp +++ b/src/detection/os/os_windows.cpp @@ -26,6 +26,7 @@ void ffDetectOSImpl(FFOSResult* os, const FFinstance* instance) if(FFWmiRecord record = query.next()) { record.getString(L"Caption", &os->variant); + ffStrbufTrimRight(&os->variant, ' '); if(ffStrbufStartsWithS(&os->variant, "Microsoft Windows ")) { ffStrbufAppendS(&os->name, "Microsoft Windows");