1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 09:29:01 +00:00

Fix pcap_gc() crash after failed attempts to open pcap readers from NSE. Patch

by Djalal.

See http://seclists.org/nmap-dev/2012/q1/43
This commit is contained in:
henri
2012-01-05 00:44:48 +00:00
parent a1bdd51eaf
commit 15f74d395f

View File

@@ -65,7 +65,7 @@ char* nsock_pcap_open(nsock_pool nsp, nsock_iod nsiod,
int to_ms = 1;
#endif
if(mp) return "nsock-pcap: this nsi already has pcap device opened";
mp = (mspcap *)safe_malloc(sizeof(mspcap));
mp = (mspcap *)safe_zalloc(sizeof(mspcap));
nsi->pcap = (void*)mp;
va_start(ap, bpf_fmt);