From 3b0b8af09854fc8fb087995908a7557073bd0d55 Mon Sep 17 00:00:00 2001 From: kris Date: Wed, 29 Aug 2007 20:33:33 +0000 Subject: [PATCH] Changing some snprintf()s from the massping migration to Snprintf()s --- scan_engine.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scan_engine.cc b/scan_engine.cc index 8cd74551b..02fe6b699 100644 --- a/scan_engine.cc +++ b/scan_engine.cc @@ -691,14 +691,14 @@ static char *probespec2ascii(probespec *pspec, char *buf, unsigned int bufsz) { Snprintf(buf, bufsz, "protocol %u", (unsigned int) pspec->proto); break; case PS_ICMP: - snprintf(buf, bufsz, "icmp type %d code %d", + Snprintf(buf, bufsz, "icmp type %d code %d", pspec->pd.icmp.type, pspec->pd.icmp.code); break; case PS_ARP: Snprintf(buf, bufsz, "ARP"); break; case PS_CONNECTTCP: - snprintf(buf, bufsz, "connect to port %hu", pspec->pd.tcp.dport); + Snprintf(buf, bufsz, "connect to port %hu", pspec->pd.tcp.dport); break; default: fatal("Unexpected %s type encountered", __func__); @@ -4300,11 +4300,11 @@ static void begin_sniffer(UltraScanInfo *USI, vector &Targets) { /* Handle all the different ping types (except ARP and TCP connect) with one filter. */ if (doIndividual) - len = snprintf(pcap_filter, sizeof(pcap_filter), + len = Snprintf(pcap_filter, sizeof(pcap_filter), "dst host %s and (icmp or ((tcp or udp) and (%s)))", inet_ntoa(Targets[0]->v4source()), dst_hosts); else - len = snprintf(pcap_filter, sizeof(pcap_filter), + len = Snprintf(pcap_filter, sizeof(pcap_filter), "dst host %s and (icmp or tcp or udp)", inet_ntoa(Targets[0]->v4source())); if (len < 0 || len >= (int) sizeof(pcap_filter))