From: sgunderson Date: Thu, 17 Aug 2000 20:59:37 +0000 (+0000) Subject: dump_file(): Allocate slightly less memory. Comment is slightly more descriptive... X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=cb771805de68719b2ba2231ddb12e5c48163de57;hp=943a09508352718751ae80804d0519d3da5f07bd;p=betaftpd dump_file(): Allocate slightly less memory. Comment is slightly more descriptive now. --- 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;