mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: Format IP as string again in error log.
In case DEBUG logging is disabled, the formatting done in the `LOGGER_DEBUG` statement above will not occur, leaving uninitialised memory here.
This commit is contained in:
parent
7a4cc107c0
commit
d0728560bc
|
@ -1 +1 @@
|
||||||
37e68ca853cd8b01b26c8d8c61d1db6546c08ed294f5650b691b7aadaf47ee18 /usr/local/bin/tox-bootstrapd
|
b3fb4157d7fc6cd3455f40020bb6b69e5bab4bbdb6ce66d5bc7095146ba5a49e /usr/local/bin/tox-bootstrapd
|
||||||
|
|
|
@ -1689,7 +1689,7 @@ bool net_connect(const Logger *log, Socket sock, const IP_Port *ip_port)
|
||||||
if (!should_ignore_connect_error(error)) {
|
if (!should_ignore_connect_error(error)) {
|
||||||
char *net_strerror = net_new_strerror(error);
|
char *net_strerror = net_new_strerror(error);
|
||||||
LOGGER_ERROR(log, "failed to connect to %s:%d: %d (%s)",
|
LOGGER_ERROR(log, "failed to connect to %s:%d: %d (%s)",
|
||||||
ip_str.buf, ip_port->port, error, net_strerror);
|
net_ip_ntoa(&ip_port->ip, &ip_str), ip_port->port, error, net_strerror);
|
||||||
net_kill_strerror(net_strerror);
|
net_kill_strerror(net_strerror);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user