openbsd-ports/security/p0f/patches/patch-p0f_c
aanriot 0e8af14039 update to 2.0.6 .
from Rui Reis <rui@rui.cx>, new maintainer;
ok jolan@
2006-05-03 07:17:44 +00:00

42 lines
1.0 KiB
Plaintext

$OpenBSD: patch-p0f_c,v 1.9 2006/05/03 07:17:44 aanriot Exp $
--- p0f.c.orig Sun Apr 30 18:29:33 2006
+++ p0f.c Sun Apr 30 18:30:49 2006
@@ -36,12 +36,6 @@
#include <pcap.h>
#include <signal.h>
-#ifdef USE_BPF
-#include USE_BPF
-#else
-#include <pcap-bpf.h>
-#endif /* ^USE_BPF */
-
#include <time.h>
#include <ctype.h>
@@ -740,7 +734,7 @@ static _u8* lookup_link(_u16 mss,_u8 txt
unknown:
if (!txt) return 0;
- sprintf(tmp,"unknown-%d",mss);
+ snprintf(tmp, sizeof(tmp), "unknown-%d",mss);
return tmp;
}
@@ -1620,13 +1614,13 @@ int main(int argc,char** argv) {
load_config(config_file);
if (argv[optind] && *(argv[optind])) {
- sprintf(buf,"(%s) and (%.3000s)",use_rule,argv[optind]);
+ snprintf(buf, sizeof(buf), "(%s) and (%.3000s)",use_rule,argv[optind]);
use_rule = buf;
}
if (use_vlan) {
_u8* x = strdup(use_rule);
- sprintf(buf,"(%.1000s) or (vlan and (%.1000s))",x,x);
+ snprintf(buf, sizeof(buf), "(%.1000s) or (vlan and (%.1000s))",x,x);
free(x);
use_rule = buf;
}