summaryrefslogtreecommitdiff
path: root/sys-devel/distcc/files/distcc-3.3.2-noexist-crash.patch
blob: 7f378082d99ede9582de6e60bb2849549cd9503b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From 24f73c5cd8f839bd520eb52e91d0d26e07689373 Mon Sep 17 00:00:00 2001
From: Shawn Landden <shawn@git.icu>
Date: Wed, 29 Aug 2018 04:52:38 -0700
Subject: [PATCH] fix #304

---
 src/daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/daemon.c b/src/daemon.c
index 5765982..c8fee7c 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -166,7 +166,7 @@ static void dcc_warn_masquerade_whitelist(void) {
         rs_log_crit(LIBDIR "/distcc not found. %s", warn);
         dcc_exit(EXIT_COMPILER_MISSING);
     }
-    if (!readdir(e) && !readdir(d)) {
+    if ((!e || !readdir(e)) && (!d || !readdir(d))) {
         rs_log_crit(LIBDIR "/distcc empty. %s", warn);
         dcc_exit(EXIT_COMPILER_MISSING);
     }