summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2008-03-16 18:00:32 +0100
committerGrzegorz Nosek <root@localdomain.pl>2008-03-16 18:00:32 +0100
commit1264f59238367b1c0cd9d2274378cf2fbc868522 (patch)
tree49f9175088c684b0f489d8ea0d72d9d106f56988
parent967abb1ff93d0eb455c374bb115ea0d6082a675a (diff)
downloadfcgiwrap-1264f59238367b1c0cd9d2274378cf2fbc868522.tar.xz
fcgiwrap-1264f59238367b1c0cd9d2274378cf2fbc868522.zip
Fix classic off-by-one in select() call
-rw-r--r--fcgiwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index 835a060..f3f0ca4 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -114,7 +114,7 @@ static void fcgi_pass(struct fcgi_context *fc)
char buf[FCGI_BUF_SIZE];
ssize_t nread;
fd_set rset;
- int maxfd = max_va(fc->fd_stdout, fc->fd_stderr, MAX_VA_SENTINEL);
+ int maxfd = 1 + max_va(fc->fd_stdout, fc->fd_stderr, MAX_VA_SENTINEL);
int nready;
const char *err;