diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-03-30 21:07:15 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-03-30 21:07:15 -0400 |
commit | 809a3a748d5f0cbaa0357ec63388ed291fb7b0bd (patch) | |
tree | bf66fdfb07c023696ce4b64afbb787b26ea06ffb /src/lib/log | |
parent | f0e39df5ce7b884ae6ff1c8579200886e298f44c (diff) | |
download | tor-809a3a748d5f0cbaa0357ec63388ed291fb7b0bd.tar.gz tor-809a3a748d5f0cbaa0357ec63388ed291fb7b0bd.zip |
bug_occurred: a place where we assumed that "buf" was still a buffer
In 9c132a5f9e87a2cd0f we replaced "buf" with a pointer and replaced
one instance of snprintf with asprintf -- but there was still one
snprintf left over, being crashy.
Fixes bug 29967; bug not in any released Tor. This is CID 1444262.
Diffstat (limited to 'src/lib/log')
-rw-r--r-- | src/lib/log/util_bug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/log/util_bug.c b/src/lib/log/util_bug.c index b9dc296fc6..65ab7bc9c6 100644 --- a/src/lib/log/util_bug.c +++ b/src/lib/log/util_bug.c @@ -117,7 +117,7 @@ tor_bug_occurred_(const char *fname, unsigned int line, } log_warn(LD_BUG, "%s:%u: %s: This line should not have been reached.%s", fname, line, func, once_str); - tor_snprintf(buf, sizeof(buf), + tor_asprintf(&buf, "Line unexpectedly reached at %s at %s:%u", func, fname, line); } else { |