From 2ca0b8b06184c24dc00beeb04157ce622e5bded5 Mon Sep 17 00:00:00 2001 From: localhorst Date: Sun, 7 Dec 2025 20:30:36 +0100 Subject: [PATCH] Missing Validation of Pipe Return Value --- src/reHDD.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/reHDD.cpp b/src/reHDD.cpp index f460325..dc0bd63 100644 --- a/src/reHDD.cpp +++ b/src/reHDD.cpp @@ -43,8 +43,15 @@ void reHDD::app_logic(void) ui = new TUI(); ui->initTUI(); - pipe(fdNewDrivesInformPipe); - pipe(fdShredInformPipe); + if (pipe(fdNewDrivesInformPipe) == -1) + { + Logger::logThis()->error("Unable to open pipe 'fdNewDrivesInformPipe'"); + } + + if (pipe(fdShredInformPipe) == -1) + { + Logger::logThis()->error("Unable to open pipe 'fdShredInformPipe'"); + } thread thDevices(ThreadScanDevices); // start thread that scans for drives thread thUserInput(ThreadUserInput); // start thread that reads user input