diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2017-07-19T09·15+0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-19T09·15+0200 |
commit | 3162ad5ff497b92fc25cd3f397eaff01d67340cc (patch) | |
tree | 30c1cf3b30256511bb32452c5c3084116356b993 /src | |
parent | 72462b4b6ec94672aad67c6fd4b5c79d2e073d7e (diff) | |
parent | d5e1bffd2a5b5c39f14944fe3ba25414dcd0d508 (diff) |
Merge pull request #1471 from veprbl/fdsetsize
Do not try to fill fd_set with fd>=FD_SETSIZE
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/build.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index 60b0a531f423..d2a270259a8c 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -3835,6 +3835,9 @@ void Worker::waitForInput() int fdMax = 0; for (auto & i : children) { for (auto & j : i.fds) { + if (j >= FD_SETSIZE) { + throw BuildError("reached FD_SETSIZE limit"); + } FD_SET(j, &fds); if (j >= fdMax) fdMax = j + 1; } |