Skip to content

Commit e26a05e

Browse files
committed
DE (Linux): ensures process returns successfully before using its output
1 parent f08a1fb commit e26a05e

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/detection/de/de_linux.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,15 @@ static const char* getTrinity(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* opt
219219
return NULL;
220220

221221
ffStrbufClear(&path);
222-
ffProcessAppendStdOut(&path, (char* const[]){
222+
if (ffProcessAppendStdOut(&path, (char* const[]){
223223
"tde-config",
224224
"--version",
225225
NULL
226-
});
227-
228-
ffParsePropLines(path.chars , "TDE: ", result);
229-
return NULL;
226+
}) == NULL)
227+
{
228+
ffParsePropLines(path.chars , "TDE: ", result);
229+
return NULL;
230+
}
230231

231232
return "All methods failed";
232233
}

0 commit comments

Comments
 (0)