[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Check for NULL in tor_assertf_nonfatal()
commit 537ad0bca3479c10fc7d1093aff534be11800dcb
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date: Fri Mar 29 18:38:27 2019 +0200
Check for NULL in tor_assertf_nonfatal()
---
src/lib/log/util_bug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c
index e5d5a2958..b9dc296fc 100644
--- a/src/lib/log/util_bug.c
+++ b/src/lib/log/util_bug.c
@@ -145,7 +145,8 @@ tor_bug_occurred_(const char *fname, unsigned int line,
log_warn(LD_BUG, "%s:%u: %s: Non-fatal assertion %s failed.%s",
fname, line, func, expr, once_str);
tor_asprintf(&buf, "Non-fatal assertion %s failed in %s at %s:%u%s%s",
- expr, func, fname, line, fmt ? " : " : "", extra);
+ expr, func, fname, line, fmt ? " : " : "",
+ extra ? extra : "");
tor_free(extra);
}
log_backtrace(LOG_WARN, LD_BUG, buf);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits