From: Daniel Pinto Date: Sun, 28 May 2017 08:53:14 +0000 (+0100) Subject: Fix crash with %include X-Git-Tag: tor-0.3.1.3-alpha~25^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8ccf8d9a9d7203107c55b73eda7473640fa19a9;p=thirdparty%2Ftor.git 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. --- 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);