From f4fcc355bfeb2a0a71d36db0521ea045889d381b Mon Sep 17 00:00:00 2001 From: nullobsi Date: Tue, 8 Jul 2025 20:36:53 +0000 Subject: [PATCH] fix: only query valid FDs (#21) On hardened glibc, calling FD_ISSET with an FD <0 or >FD_SETSIZE causes a SIGABRT. Only query FDs that are associated with enabled repeater modules to work around this crash. --- QnetGateway.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 6801304..f08f0e3 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -2127,7 +2127,7 @@ void CQnetGateway::Run() // process packets coming from local repeater module(s) for (int i=0; i<3; i++) { - if (keep_running && FD_ISSET(FromModem[i].GetFD(), &fdset)) + if (keep_running && Rptr.mod[i].defined && FD_ISSET(FromModem[i].GetFD(), &fdset)) { SDSVT dsvt; const ssize_t len = FromModem[i].Read(dsvt.title, 56);