diff options
author | Guy Harris <guy@alum.mit.edu> | 2018-10-16 00:15:38 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2018-10-16 00:15:38 -0700 |
commit | 017c240336a375aebd52ec30cf341a207f1c12a4 (patch) | |
tree | 51018597dbbf7efcfeb940e14f0a7bd58ea01095 /pcap-null.c | |
parent | ed63d72f6b9bddab83fc35a957a6a9ff02501d0a (diff) |
Provide out own strlcpy() and strlcat() routines if necessary.
We now depend on the *full* semantics of those routines, including the
return value being usable for truncation checks.
If we're building for a UN*X that has them, define pcap_strl{cpy,cat} to
be strl{cpy,cat}.
If we're building for Windows using MSVC, define pcap_strl{cpy,cat}, not
strl{cpy,cat}.
Otherwise, build our won versions of pcap_strl{cpy,cat} from BSD-derived
source code.
Diffstat (limited to 'pcap-null.c')
-rw-r--r-- | pcap-null.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pcap-null.c b/pcap-null.c index 92a5e2d8..a0851480 100644 --- a/pcap-null.c +++ b/pcap-null.c @@ -32,7 +32,7 @@ static char nosup[] = "live packet capture not supported on this system"; pcap_t * pcap_create_interface(const char *device _U_, char *ebuf) { - (void)strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE); + (void)pcap_strlcpy(ebuf, nosup, PCAP_ERRBUF_SIZE); return (NULL); } @@ -50,7 +50,7 @@ int pcap_lookupnet(const char *device _U_, bpf_u_int32 *netp _U_, bpf_u_int32 *maskp _U_, char *errbuf) { - (void)strlcpy(errbuf, nosup, PCAP_ERRBUF_SIZE); + (void)pcap_strlcpy(errbuf, nosup, PCAP_ERRBUF_SIZE); return (-1); } #endif |