summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2008-03-22 22:15:39 +0100
committerGrzegorz Nosek <root@localdomain.pl>2008-03-22 22:15:39 +0100
commit978f549e1c8e96a8fa0023102e4844bad1278390 (patch)
treed182cefef7cccc9fe1e6d3748266d10568fa3606
parent6e6f0297fa8810881095fcba448cb6555a8fe55f (diff)
downloadfcgiwrap-978f549e1c8e96a8fa0023102e4844bad1278390.tar.xz
fcgiwrap-978f549e1c8e96a8fa0023102e4844bad1278390.zip
Fix off-by-one while walking the buffer
-rw-r--r--fcgiwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index 72037c1..c4369d5 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -163,7 +163,7 @@ static const char * fcgi_pass_fd(struct fcgi_context *fc, int *fdp, FCGI_FILE *f
nread = read(*fdp, buf, bufsize);
if (nread > 0) {
- while (p <= buf + nread) {
+ while (p < buf + nread) {
if (*p == '\r') {
cclass = CC_CR;
} else if (*p == '\n') {