[or-cvs] r10978: start hunting bugs, first in a non-crashy manner (tor/trunk/src/or)

arma at seul.org arma at seul.org
Mon Jul 30 01:07:06 UTC 2007


Author: arma
Date: 2007-07-29 21:07:06 -0400 (Sun, 29 Jul 2007)
New Revision: 10978

Modified:
   tor/trunk/src/or/config.c
Log:
start hunting bugs, first in a non-crashy manner


Modified: tor/trunk/src/or/config.c
===================================================================
--- tor/trunk/src/or/config.c	2007-07-29 23:18:06 UTC (rev 10977)
+++ tor/trunk/src/or/config.c	2007-07-30 01:07:06 UTC (rev 10978)
@@ -756,6 +756,10 @@
 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



More information about the tor-commits mailing list