mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
bug_occurred: a place where we assumed that "buf" was still a buffer
In 9c132a5f9e 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.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user