aboutsummaryrefslogtreecommitdiff
path: root/bpf_image.c
diff options
context:
space:
mode:
authoritojun <itojun>2000-04-27 09:11:11 +0000
committeritojun <itojun>2000-04-27 09:11:11 +0000
commit20d9e08cde232247531358fd448ad845c89c7a16 (patch)
treeae51489e2f967ec34cc9cba84fc74e78b44a1104 /bpf_image.c
parent14b709dd48cc512bd2c8f0b8ddb57c2ac1fbfc9e (diff)
do not use sprintf(). always use snprintf().
from NetBSD/OpenBSD src/lib/libpcap. use freeifaddrs() if exists.
Diffstat (limited to 'bpf_image.c')
-rw-r--r--bpf_image.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bpf_image.c b/bpf_image.c
index 66265c8a..c7d3aaea 100644
--- a/bpf_image.c
+++ b/bpf_image.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.22 1999-10-07 23:46:40 mcr Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.23 2000-04-27 09:11:11 itojun Exp $ (LBL)";
#endif
#include <sys/types.h>
@@ -277,8 +277,8 @@ bpf_image(p, n)
fmt = "";
break;
}
- (void)sprintf(operand, fmt, v);
- (void)sprintf(image,
+ (void)snprintf(operand, sizeof operand, fmt, v);
+ (void)snprintf(image, sizeof image,
(BPF_CLASS(p->code) == BPF_JMP &&
BPF_OP(p->code) != BPF_JA) ?
"(%03d) %-8s %-16s jt %d\tjf %d"