diff options
author | Denis Ovsienko <denis@ovsienko.info> | 2023-01-02 15:06:49 +0000 |
---|---|---|
committer | Denis Ovsienko <denis@ovsienko.info> | 2023-01-02 15:06:49 +0000 |
commit | 5d055cc10560d8df19109be844ef45ee79a8086d (patch) | |
tree | 8d5cd4ae7381e05cf45fb5b697b0e5505bb55322 | |
parent | 1f3650863b97f6f3d62db2b524de3ba61ffadf6b (diff) |
Revert "Fix NULL pointer dereference in snf_read()"
As Guy points out, in this context the variable p never is NULL.
This reverts commit 1f3650863b97f6f3d62db2b524de3ba61ffadf6b.
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | CREDITS | 1 | ||||
-rw-r--r-- | pcap-snf.c | 3 |
3 files changed, 1 insertions, 4 deletions
@@ -3,7 +3,6 @@ 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 @@ -70,7 +70,6 @@ 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> @@ -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; + struct pcap_snf *ps = p->priv; struct pcap_pkthdr hdr; int i, flags, err, caplen, n; struct snf_recv_req req; @@ -139,7 +139,6 @@ 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, |