From cb771805de68719b2ba2231ddb12e5c48163de57 Mon Sep 17 00:00:00 2001 From: sgunderson Date: Thu, 17 Aug 2000 20:59:37 +0000 Subject: [PATCH] dump_file(): Allocate slightly less memory. Comment is slightly more descriptive now. --- ftpd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ftpd.c b/ftpd.c index 473624e..b36027b 100644 --- a/ftpd.c +++ b/ftpd.c @@ -1540,11 +1540,12 @@ void clear_bad_fds(int * const server_sock) * dump_file(): Dumps a file on the control connection. Used for * welcome messages and the likes. Note that outbuf * is so big, to prevent any crashing from users creating - * weird .message files (like 1024 LFs)... + * weird .message files (like 1024 LFs)... The size of + * the file is limited to 1024 bytes (by truncation). */ void dump_file(struct conn * const c, const int num, const char * const filename) { - char buf[1024], outbuf[8192]; + char buf[1024], outbuf[5121]; char *ptr = outbuf + 4; int i, j = -1; -- 2.39.2