aboutsummaryrefslogtreecommitdiff
path: root/pcap-snit.c
diff options
context:
space:
mode:
authoritojun <itojun>2000-04-27 11:16:19 +0000
committeritojun <itojun>2000-04-27 11:16:19 +0000
commit6abf10866e492d3cf72df894e0551f59ee4d832e (patch)
treedf3cb342e2f511b5073e7d7daee1a22db8708952 /pcap-snit.c
parentd2268605b4c5f8e21b0dec876cd5c5037e01c4af (diff)
nuke strcpy()
Diffstat (limited to 'pcap-snit.c')
-rw-r--r--pcap-snit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pcap-snit.c b/pcap-snit.c
index a80491ee..3b90df18 100644
--- a/pcap-snit.c
+++ b/pcap-snit.c
@@ -25,7 +25,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.46 2000-04-27 09:11:13 itojun Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-snit.c,v 1.47 2000-04-27 11:16:20 itojun Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -213,7 +213,7 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf)
p = (pcap_t *)malloc(sizeof(*p));
if (p == NULL) {
- strcpy(ebuf, pcap_strerror(errno));
+ strlcpy(ebuf, pcap_strerror(errno), PCAP_ERRBUFF_SIZE);
return (NULL);
}
@@ -287,7 +287,7 @@ pcap_open_live(char *device, int snaplen, int promisc, int to_ms, char *ebuf)
p->bufsize = BUFSPACE;
p->buffer = (u_char *)malloc(p->bufsize);
if (p->buffer == NULL) {
- strcpy(ebuf, pcap_strerror(errno));
+ strlcpy(ebuf, pcap_strerror(errno), PCAP_ERRBUFF_SIZE);
goto bad;
}
return (p);