AmendHub

Download:

jcs

/

subtext

/

amendments

/

167

telnet: Fix format string in previous


jcs made amendment 167 over 2 years ago
--- telnet.c Wed Jun 22 23:03:56 2022 +++ telnet.c Thu Jun 23 09:07:15 2022 @@ -566,7 +566,8 @@ telnet_input(struct session *session) if (tspeed > 57600) tspeed = 57600; node->session->tspeed = - node->session->log.tspeed = (unsigned short)tspeed; + node->session->log.tspeed = + (unsigned short)tspeed; } break; } @@ -777,7 +778,7 @@ telnet_close(struct session *session) if (session->ban_node_source && !node->from_trusted_proxy) { session_log(session, "Closing telnet connection from %s and " "banning IP", node->ip_s); - + for (n = 0; n <= MAX_BANNED_IPS; n++) { if (n == MAX_BANNED_IPS) { memmove(banned_ips + sizeof(banned_ips[0]), banned_ips, @@ -820,7 +821,7 @@ telnet_ip_is_banned(ip_addr ip) if (banned_ips[j].ip && (Time - banned_ips[j].time > IP_BAN_SECONDS)) { long2ip(banned_ips[j].ip, ip_s); - logger_printf(logger, "[%s] Unbanning IP %s after %d seconds", + logger_printf(logger, "[%s] Unbanning IP after %d seconds", ip_s, Time - banned_ips[j].time); banned_ips[j].ip = 0; continue;