|
@@ -0,0 +1,37 @@
|
|
1
|
+From 78ebe6c1dab648e3190363cb38ad5be356884494 Mon Sep 17 00:00:00 2001
|
|
2
|
+From: Nikos Mavrogiannopoulos <nmav@gnutls.org>
|
|
3
|
+Date: Tue, 5 Jan 2016 21:37:35 +0100
|
|
4
|
+Subject: [PATCH] don't attempt to open per_user_dir if it is NULL
|
|
5
|
+
|
|
6
|
+This addresses a crash in certain libc's.
|
|
7
|
+---
|
|
8
|
+ src/config.c | 5 ++++-
|
|
9
|
+ 1 file changed, 4 insertions(+), 1 deletion(-)
|
|
10
|
+
|
|
11
|
+diff --git a/src/config.c b/src/config.c
|
|
12
|
+index 827a7a0..50db655 100644
|
|
13
|
+--- a/src/config.c
|
|
14
|
++++ b/src/config.c
|
|
15
|
+@@ -617,6 +617,9 @@ static void load_iroutes(struct cfg_st *config)
|
|
16
|
+ struct dirent *r;
|
|
17
|
+ char path[_POSIX_PATH_MAX];
|
|
18
|
+
|
|
19
|
++ if (config->per_user_dir == NULL)
|
|
20
|
++ return;
|
|
21
|
++
|
|
22
|
+ dir = opendir(config->per_user_dir);
|
|
23
|
+ if (dir != NULL) {
|
|
24
|
+ do {
|
|
25
|
+@@ -626,8 +629,8 @@ static void load_iroutes(struct cfg_st *config)
|
|
26
|
+ append_iroutes_from_file(config, path);
|
|
27
|
+ }
|
|
28
|
+ } while(r != NULL);
|
|
29
|
++ closedir(dir);
|
|
30
|
+ }
|
|
31
|
+- closedir(dir);
|
|
32
|
+ }
|
|
33
|
+
|
|
34
|
+ static void parse_cfg_file(void *pool, const char* file, struct perm_cfg_st *perm_config, unsigned reload)
|
|
35
|
+--
|
|
36
|
+2.5.1
|
|
37
|
+
|