소스 검색

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.
Daniel Pinto 7 년 전
부모
커밋
f8ccf8d9a9
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/common/confline.c

+ 2 - 1
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);