From: Guy Harris Date: Wed, 4 Nov 2015 00:08:10 +0000 (-0800) Subject: More snprintf -> pcap_snprintf. X-Git-Tag: libpcap-1.8.0-bp~119 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/6d35f01601154022c4568addf44af1338bc9da4c More snprintf -> pcap_snprintf. --- diff --git a/sf-pcap-ng.c b/sf-pcap-ng.c index 2d4ec813..ea44da91 100644 --- a/sf-pcap-ng.c +++ b/sf-pcap-ng.c @@ -895,7 +895,7 @@ pcap_ng_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf, /* currently only SHB version 1.0 is supported */ if (! (shbp->major_version == PCAP_NG_VERSION_MAJOR && shbp->minor_version == PCAP_NG_VERSION_MINOR)) { - snprintf(errbuf, PCAP_ERRBUF_SIZE, + pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "unsupported pcap-ng savefile version %u.%u", shbp->major_version, shbp->minor_version); goto fail; @@ -948,10 +948,10 @@ pcap_ng_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf, * Interface capture length sanity check */ if (idbp->snaplen > MAXIMUM_SNAPLEN) { - snprintf(errbuf, PCAP_ERRBUF_SIZE, - "invalid interface capture length %u, " - "bigger than maximum of %u", - idbp->snaplen, MAXIMUM_SNAPLEN); + pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, + "invalid interface capture length %u, " + "bigger than maximum of %u", + idbp->snaplen, MAXIMUM_SNAPLEN); goto fail; } diff --git a/sf-pcap.c b/sf-pcap.c index 4f47c101..55c9a579 100644 --- a/sf-pcap.c +++ b/sf-pcap.c @@ -225,7 +225,7 @@ pcap_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf, hdr.version_minor <= PCAP_VERSION_MINOR) || (hdr.version_major == 543 && hdr.version_minor == 0))) { - snprintf(errbuf, PCAP_ERRBUF_SIZE, + pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "unsupported pcap savefile version %u.%u", hdr.version_major, hdr.version_minor); *err = 1; @@ -233,7 +233,7 @@ pcap_check_header(bpf_u_int32 magic, FILE *fp, u_int precision, char *errbuf, } if (hdr.snaplen > MAXIMUM_SNAPLEN) { - snprintf(errbuf, PCAP_ERRBUF_SIZE, + pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "invalid file capture length %u, bigger than " "maximum of %u", hdr.snaplen, MAXIMUM_SNAPLEN); *err = 1;