Hi tech@,
I recently checked the slowcgi(8) and found that it might have an issue
when buf_pos is at the end of buffer and buf_len is zero.
Am I right?
Index: slowcgi.c
===================================================================
RCS file: /cvs/src/usr.sbin/slowcgi/slowcgi.c,v
retrieving revision 1.50
diff -u -p -r1.50 slowcgi.c
--- slowcgi.c 4 Sep 2016 14:40:34 -0000 1.50
+++ slowcgi.c 2 Jan 2017 12:52:01 -0000
@@ -674,8 +674,8 @@ slowcgi_request(int fd, short events, vo
/* Make space for further reads */
if (c->buf_len > 0) {
bcopy(c->buf + c->buf_pos, c->buf, c->buf_len);
- c->buf_pos = 0;
}
+ c->buf_pos = 0;
return;
fail:
cleanup_request(c);