--- winip.c.org 2004-09-14 19:13:24.786581000 -0700 +++ winip.c 2004-09-14 19:24:04.905934500 -0700 @@ -860,7 +860,7 @@ pcap_t *pd, PFILTERFN filter, char *bpf, ...) { va_list ap; - char buf[512]; + char buf[3072]; // same size as bpf ie size of filter in scan_engine.cc struct bpf_program fcode; unsigned int localnet, netmask; char err0r[256]; @@ -875,7 +875,10 @@ ; /* fatal("Failed to lookup device subnet/netmask: %s", err0r);*/ va_start(ap, bpf); - vsprintf(buf, bpf, ap); + if (vsnprintf(buf, sizeof(buf), bpf, ap) < 0) + { + fatal("Failed to copy the filter string %s",bpf); + } va_end(ap); if (o.debugging)