aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-02-12 11:56:13 +0000
committerOmar Polo <op@omarpolo.com>2021-02-12 11:56:13 +0000
commit9356f61a63d2d50194884ada28a9f3164fdd00f4 (patch)
tree615db5beca85ea40e10856a66faa36bea8f937de
parent5e3285d52ea2b97b84fdef0b3785782d7947b50e (diff)
BUFSIZ is variable, we need *exactly* 1024
Using BUFSIZ in sbuf is not OK. It's variable, and in various places we assume that sbuf is 1024 (like handle_cgi_reply). We could patch those, but we aren't sure BUFSIZ is >= 1024! Let's keep the hardcoded number. (found by debugging on arch on amd64, where BUFSIZ is bigger)
-rw-r--r--gmid.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmid.h b/gmid.h
index 6d339c1..a2e6be5 100644
--- a/gmid.h
+++ b/gmid.h
@@ -171,7 +171,7 @@ struct client {
const char *meta;
int fd, pfd;
DIR *dir;
- char sbuf[BUFSIZ];
+ char sbuf[1024];
ssize_t len, off;
struct sockaddr_storage addr;
struct vhost *host; /* host she's talking to */