Commit Diff


commit - 2c3e53dac6faed4d9502bd3310b4837f0d3112cf
commit + de62c38d81239d09db425974b3197c32d0fad51b
blob - 19b72b9790045ccc1c901644026500c808a5124e
blob + 767d8239ce82b7a0ae18c80fe6b562d7896afb5d
--- log.c
+++ log.c
@@ -252,7 +252,7 @@ handle_log(int fd, short ev, void *d)
 
 		datalen = imsg.hdr.len - IMSG_HEADER_SIZE;
 		msg = imsg.data;
-		msg[datalen] = '\0';
+		msg[datalen-1] = '\0';
 
 		/* ignore imsg.hdr.type for now */
 		if (conf.foreground)