aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/or/config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c
index 4663e5b3d..0f6f8e0c9 100644
--- a/src/or/config.c
+++ b/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