blob: 8b1877366c20cba7c2d7b5b4e79165f4c82284e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
From fb93975777a1cffba80544e08ca81606532395d6 Mon Sep 17 00:00:00 2001
From: DroidTest <53651584+DroidTest@users.noreply.github.com>
Date: Thu, 29 Jul 2021 11:36:26 +0800
Subject: [PATCH] fix the maxfile_size checking bug
Fix the predicate that never evaluates true
---
src/ftpd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/ftpd.c b/src/ftpd.c
index d856839..61275de 100644
--- a/src/ftpd.c
+++ b/src/ftpd.c
@@ -4247,8 +4247,8 @@ void dostor(char *name, const int append, const int autorename)
if (quota_update("a, 0LL, 0LL, &overflow) == 0 &&
(overflow > 0 || quota.files >= user_quota_files ||
quota.size > user_quota_size ||
- (max_filesize >= (off_t) 0 &&
- (max_filesize = user_quota_size - quota.size) < (off_t) 0))) {
+ ((max_filesize = user_quota_size - quota.size) < (off_t) 0 &&
+ max_filesize >= (off_t) 0))) {
overflow = 1;
(void) close(f);
goto afterquota;
|