ソースを参照

start hunting bugs, first in a non-crashy manner

svn:r10978
Roger Dingledine 17 年 前
コミット
468d922280
1 ファイル変更4 行追加0 行削除
  1. 4 0
      src/or/config.c

+ 4 - 0
src/or/config.c

@@ -756,6 +756,10 @@ config_free_all(void)
 const char *
 safe_str(const char *address)
 {
+  if (!address) { /* XXX020 eventually turn this into an assert */
+    log_warn(LD_BUG, "safe_str() called with NULL address.");
+    return "EMPTY";
+  }
   if (get_options()->SafeLogging)
     return "[scrubbed]";
   else