From 4eb955ee855c08e0085c158abea15cf7369ae802 Mon Sep 17 00:00:00 2001 From: Bill Blough Date: Wed, 21 Oct 2015 01:59:12 -0400 Subject: [PATCH] Pass imcp unreachable message string to print_warning instead of int. This fixes the segfault reported in issue 85. --- src/fping.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fping.c b/src/fping.c index 47b6181..a7af5ed 100644 --- a/src/fping.c +++ b/src/fping.c @@ -1741,7 +1741,8 @@ int handle_random_icmp(FPING_ICMPHDR *p, struct sockaddr *addr, socklen_t addr_l addr_ascii, h->host ); } else { - print_warning("%s from %s for ICMP Echo sent to %s", icmp_code, addr_ascii, h->host); + print_warning("%s from %s for ICMP Echo sent to %s", + icmp_unreach_str[icmp_code], addr_ascii, h->host); } if( inet_addr( h->host ) == INADDR_NONE )