aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES1
-rw-r--r--CREDITS1
-rw-r--r--pcap-snf.c3
3 files changed, 4 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index 483e0be2..c0108231 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,7 @@ Monthday, Month DD, YYYY:
Source code:
Use C99 fixed-width integer types, rather than self-defined
fixed-width integer types, in rpcap code.
+ pcap-snf.c: Fix NULL pointer dereference in snf_read()
Link-layer types:
Add LINKTYPE_ETW/DLT_ETW.
Add LINKTYPE_NETANALYZER_NG/DLT_NETANALYZER_NG (pull request
diff --git a/CREDITS b/CREDITS
index 08c650b6..b4b2b5df 100644
--- a/CREDITS
+++ b/CREDITS
@@ -70,6 +70,7 @@ Additional people who have contributed patches (in alphabetical order):
Dustin Spicuzza <dustin at virtualroadside dot com>
dzejarczech <dzejarczech at sourceforge dot net>
Edward Sheldrake <ejs1920 at sourceforge dot net>
+ Ege Cetin <egecetin at hotmail dot com dot tr>
Eric Anderson <anderse at hpl dot hp dot com>
Erik de Castro Lopo <erik dot de dot castro dot lopo at sensorynetworks dot com>
Fedor Sakharov <fedor dot sakharov at gmail dot com>
diff --git a/pcap-snf.c b/pcap-snf.c
index b885e026..2503c707 100644
--- a/pcap-snf.c
+++ b/pcap-snf.c
@@ -131,7 +131,7 @@ snf_timestamp_to_timeval(const int64_t ts_nanosec, const int tstamp_precision)
static int
snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
{
- struct pcap_snf *ps = p->priv;
+ struct pcap_snf *ps;
struct pcap_pkthdr hdr;
int i, flags, err, caplen, n;
struct snf_recv_req req;
@@ -139,6 +139,7 @@ snf_read(pcap_t *p, int cnt, pcap_handler callback, u_char *user)
if (!p)
return -1;
+ ps = p->priv;
/*
* This can conceivably process more than INT_MAX packets,