diff --git a/nping/NpingOps.cc b/nping/NpingOps.cc index 07bbc7274..4c9fe56f8 100644 --- a/nping/NpingOps.cc +++ b/nping/NpingOps.cc @@ -374,31 +374,31 @@ char * NpingOps::mode2Ascii(int md) { switch( md ){ case TCP_CONNECT: - sprintf(buff, "TCP-Connect"); + bufset(buff, "TCP-Connect"); break; case TCP: - sprintf(buff, "TCP"); + bufset(buff, "TCP"); break; case UDP: - sprintf(buff, "UDP"); + bufset(buff, "UDP"); break; case UDP_UNPRIV: - sprintf(buff, "UDP-Unprivileged"); + bufset(buff, "UDP-Unprivileged"); break; case ICMP: - sprintf(buff, "ICMP"); + bufset(buff, "ICMP"); break; case ARP: - sprintf(buff, "ARP"); + bufset(buff, "ARP"); break; default: - sprintf(buff, "Unknown mode"); + bufset(buff, "Unknown mode"); break; } return buff; diff --git a/nping/ProbeMode.cc b/nping/ProbeMode.cc index 4697996cb..7238923fd 100644 --- a/nping/ProbeMode.cc +++ b/nping/ProbeMode.cc @@ -1209,7 +1209,7 @@ const char *ProbeMode::getBPFFilterString(){ inet_ntop(AF_INET, &s4->sin_addr, ipstring, sizeof(ipstring)); }else{ nping_warning(QT_2, "Warning: Wrong address family (%d) in getBPFFilterString(). Please report a bug", srcss.ss_family); - sprintf(ipstring,"127.0.0.1"); + bufset(ipstring,"127.0.0.1"); } /* Tell the filter that we only want incoming packets, destined to our source IP */