ソースを参照

writing instructions before you release means you can make sure
your instructions don't seg fault


svn:r10984

Roger Dingledine 19 年 前
コミット
1b01ad6d38
1 ファイル変更2 行追加0 行削除
  1. 2 0
      src/or/config.c

+ 2 - 0
src/or/config.c

@@ -2383,6 +2383,8 @@ parse_authority_type_from_list(smartlist_t *list, authority_type_t *auth,
 {
 {
   tor_assert(auth);
   tor_assert(auth);
   *auth = NO_AUTHORITY;
   *auth = NO_AUTHORITY;
+  if (!list) /* empty list, answer is none */
+    return 0;
   SMARTLIST_FOREACH(list, const char *, string, {
   SMARTLIST_FOREACH(list, const char *, string, {
     if (!strcasecmp(string, "v1"))
     if (!strcasecmp(string, "v1"))
       *auth |= V1_AUTHORITY;
       *auth |= V1_AUTHORITY;