]> git.pld-linux.org Git - packages/proftpd.git/blob - args.patch
- rel 2; fix FSCachePolicy parameter handling
[packages/proftpd.git] / args.patch
1 From bcaa485b4edbb4d1283b5d3ccdd0aa1ee02f0ae7 Mon Sep 17 00:00:00 2001
2 From: TJ Saunders <tj@castaglia.org>
3 Date: Thu, 7 Nov 2019 09:58:00 -0800
4 Subject: [PATCH] Issue #863: Make sure we increment our index, for properly
5  processing the `FSCachePolicy` directive parameters.  Oops.
6
7 ---
8  modules/mod_core.c | 6 ++++--
9  1 file changed, 4 insertions(+), 2 deletions(-)
10
11 diff --git a/modules/mod_core.c b/modules/mod_core.c
12 index 1da6b4c80..c12425a1b 100644
13 --- a/modules/mod_core.c
14 +++ b/modules/mod_core.c
15 @@ -1450,7 +1450,8 @@ MODRET set_fscachepolicy(cmd_rec *cmd) {
16      if (strncasecmp(cmd->argv[i], "size", 5) == 0) {
17        int size;
18  
19 -      size = atoi(cmd->argv[i++]);
20 +      i++;
21 +      size = atoi(cmd->argv[i]);
22        if (size < 1) {
23          CONF_ERROR(cmd, "size parameter must be greater than 1");
24        }
25 @@ -1460,7 +1461,8 @@ MODRET set_fscachepolicy(cmd_rec *cmd) {
26      } else if (strncasecmp(cmd->argv[i], "maxAge", 7) == 0) {
27        int max_age;
28  
29 -      max_age = atoi(cmd->argv[i++]);
30 +      i++;
31 +      max_age = atoi(cmd->argv[i]);
32        if (max_age < 1) {
33          CONF_ERROR(cmd, "maxAge parameter must be greater than 1");
34        }
This page took 0.06515 seconds and 3 git commands to generate.