summary refs log tree commit diff
path: root/server.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-26 02:28:35 -0500
committerJune McEnroe <june@causal.agency>2020-02-26 02:37:10 -0500
commitfe437b2ea18df5ecd1baa5086ccc1e866af21df5 (patch)
tree55084737d377d8f99d38fa7cc46868a90975d5aa /server.c
parentAdd time tag to lines missing it (diff)
downloadpounce-fe437b2ea18df5ecd1baa5086ccc1e866af21df5.tar.gz
pounce-fe437b2ea18df5ecd1baa5086ccc1e866af21df5.zip
Tweak buffer sizes
Filter functions are dealing with lines not including CRLF, so they
already have extra space. serverFormat is using snprintf which wants to
always write a NUL at the end of the string.
Diffstat (limited to 'server.c')
-rw-r--r--server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.c b/server.c
index abc7d40..20d94e3 100644
--- a/server.c
+++ b/server.c
@@ -139,7 +139,7 @@ void serverSend(const char *ptr, size_t len) {
 }
 
 void serverFormat(const char *format, ...) {
-	char buf[MessageCap];
+	char buf[MessageCap + 1];
 	va_list ap;
 	va_start(ap, format);
 	int len = vsnprintf(buf, sizeof(buf), format, ap);