]> git.sesse.net Git - betaftpd/commitdiff
dump_file(): Allocate slightly less memory. Comment is slightly more descriptive...
authorsgunderson <sgunderson>
Thu, 17 Aug 2000 20:59:37 +0000 (20:59 +0000)
committersgunderson <sgunderson>
Thu, 17 Aug 2000 20:59:37 +0000 (20:59 +0000)
ftpd.c

diff --git a/ftpd.c b/ftpd.c
index 473624e53ba55e8a115e8fdb3798dc343b9fe448..b36027b51e1da9e6de71b56d33f639842fd8351c 100644 (file)
--- 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;