summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorYaroslav Tykhiy <ytykhiy@gmail.com>2002-08-15 14:41:01 +0000
committerYaroslav Tykhiy <ytykhiy@gmail.com>2002-08-15 14:41:01 +0000
commit1ef681d32dcd731aaf5c50544d2f75f0239588d1 (patch)
tree3dfdd824f7566ecb0fde3fa5a12cac39be696b0c /libexec
parentb383708ec3664f4670874cebf2fd3f627ea48888 (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/ftpd/ftpcmd.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 9775b64868a3..55210f16e673 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -1066,6 +1066,8 @@ check_login_ro
#define MAXGLOBARGS 1000
+#define MAXASIZE 10240 /* Deny ASCII SIZE on files larger than that */
+
struct tab {
char *name;
short token;
@@ -1598,6 +1600,10 @@ sizecmd(filename)
reply(550, "%s: not a plain file.", filename);
(void) fclose(fin);
return;
+ } else if (stbuf.st_size > MAXASIZE) {
+ reply(550, "%s: too large for type A SIZE.", filename);
+ (void) fclose(fin);
+ return;
}
count = 0;