commit a53fb4c34c8dc09e81ed0577df51a11bc5b7ae3e Author: Tomas Korbar Date: Thu May 25 14:59:46 2023 +0200 Fix freed memory access in posttls-finger diff --git a/src/posttls-finger/posttls-finger.c b/src/posttls-finger/posttls-finger.c index 2f3a58e..d446583 100644 --- a/src/posttls-finger/posttls-finger.c +++ b/src/posttls-finger/posttls-finger.c @@ -1590,12 +1590,12 @@ static char *parse_destination(char *destination, char *def_service, static void connect_remote(STATE *state, char *dest) { DNS_RR *addr; - char *buf; - char *domain; - char *service; /* When reconnecting use IP address of previous session */ if (state->addr == 0) { + char *buf; + char *domain; + char *service; buf = parse_destination(dest, state->smtp ? "smtp" : "24", &domain, &service, &state->port); if (!state->nexthop) @@ -1622,8 +1622,8 @@ static void connect_remote(STATE *state, char *dest) if (level == TLS_LEV_INVALID || (state->stream = connect_addr(state, addr)) == 0) { - msg_info("Failed to establish session to %s:%s via %s:%u: %s", - dest, service, HNAME(addr), addr->port, + msg_info("Failed to establish session to %s via %s:%u: %s", + dest, HNAME(addr), addr->port, vstring_str(state->why->reason)); continue; }