summaryrefslogtreecommitdiff
path: root/src/common/confline.c
diff options
context:
space:
mode:
authorDaniel Pinto <danielpinto52@gmail.com>2017-05-28 09:53:14 +0100
committerDaniel Pinto <danielpinto52@gmail.com>2017-05-28 09:53:14 +0100
commitf8ccf8d9a9d7203107c55b73eda7473640fa19a9 (patch)
tree4403d2099963a23f4de1dc95d3f95888f4981a7e /src/common/confline.c
parent6fcaf83c98df4a12149cd4b5956cd96f3e59ccfd (diff)
downloadtor-f8ccf8d9a9d7203107c55b73eda7473640fa19a9.tar.gz
tor-f8ccf8d9a9d7203107c55b73eda7473640fa19a9.zip
Fix crash with %include
Fixes crash when including a folder that contains a non-empty file without any values followed by any other non-empty file.
Diffstat (limited to 'src/common/confline.c')
-rw-r--r--src/common/confline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/confline.c b/src/common/confline.c
index f04b7a8757..c2122a1c68 100644
--- a/src/common/confline.c
+++ b/src/common/confline.c
@@ -300,7 +300,8 @@ config_process_include(const char *path, int recursion_level, int extended,
tor_free(config_file);
**next = included_list;
- *next = &(*list_last)->next;
+ if (*list_last)
+ *next = &(*list_last)->next;
} SMARTLIST_FOREACH_END(config_file);
smartlist_free(config_files);