]> git.pld-linux.org Git - packages/pure-ftpd.git/blob - pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
Rel 5; pure-uploadscript retval has meaning only if it is enabled
[packages/pure-ftpd.git] / pure-ftpd-1.0.49-diraliases_uninitialized_pointer.patch
1 From 8d0d42542e2cb7a56d645fbe4d0ef436e38bcefa Mon Sep 17 00:00:00 2001
2 From: Frank Denis <github@pureftpd.org>
3 Date: Tue, 18 Feb 2020 18:36:58 +0100
4 Subject: [PATCH] diraliases: always set the tail of the list to NULL
5
6 Spotted and reported by Antonio Norales from GitHub Security Labs.
7 Thanks!
8 ---
9  src/diraliases.c | 2 +-
10  1 file changed, 1 insertion(+), 1 deletion(-)
11
12 diff --git a/src/diraliases.c b/src/diraliases.c
13 index 4002a36..fb70273 100644
14 --- a/src/diraliases.c
15 +++ b/src/diraliases.c
16 @@ -93,7 +93,6 @@ int init_aliases(void)
17                  (tail->dir = strdup(dir)) == NULL) {
18                  die_mem();
19              }
20 -            tail->next = NULL;
21          } else {
22              DirAlias *curr;
23  
24 @@ -105,6 +104,7 @@ int init_aliases(void)
25              tail->next = curr;
26              tail = curr;
27          }
28 +        tail->next = NULL;
29      }
30      fclose(fp);
31      aliases_up++;
This page took 0.023116 seconds and 3 git commands to generate.