Check for NULL in tor_assertf_nonfatal()

This commit is contained in:
rl1987 2019-03-29 18:38:27 +02:00 committed by Nick Mathewson
parent 9c132a5f9e
commit 537ad0bca3

View File

@ -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);