From e26a05e3aca424f2dcf737d2147323da506b600b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 21 Jan 2026 14:28:40 +0800 Subject: [PATCH] DE (Linux): ensures process returns successfully before using its output --- src/detection/de/de_linux.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index 7764650f0..ee2aeafcc 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -219,14 +219,15 @@ static const char* getTrinity(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* opt return NULL; ffStrbufClear(&path); - ffProcessAppendStdOut(&path, (char* const[]){ + if (ffProcessAppendStdOut(&path, (char* const[]){ "tde-config", "--version", NULL - }); - - ffParsePropLines(path.chars , "TDE: ", result); - return NULL; + }) == NULL) + { + ffParsePropLines(path.chars , "TDE: ", result); + return NULL; + } return "All methods failed"; }