]> git.gsnw.org Git - fping.git/commitdiff
Pass imcp unreachable message string to print_warning instead of int.
authorBill Blough <Bill.Blough@xerox.com>
Wed, 21 Oct 2015 05:59:12 +0000 (01:59 -0400)
committerBill Blough <Bill.Blough@xerox.com>
Wed, 21 Oct 2015 05:59:12 +0000 (01:59 -0400)
This fixes the segfault reported in issue 85.

src/fping.c

index 47b61812326a41e235d587fdf99f14a68bae9559..a7af5ed9a366b64885c7bcd1925c3f142e4c418c 100644 (file)
@@ -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 )