36 lines
1.0 KiB
Diff
36 lines
1.0 KiB
Diff
From 2a46edf29049ccf3dcfb7a2f2a2cdb6943a3e142 Mon Sep 17 00:00:00 2001
|
|
From: Cedric Cellier <rixed@happyleptic.org>
|
|
Date: Fri, 25 May 2018 15:46:39 +0200
|
|
Subject: [PATCH 001/470] Fix using uninitialised file descriptor
|
|
|
|
Too quick copy-pasta.
|
|
---
|
|
pcap-rpcap.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/pcap-rpcap.c b/pcap-rpcap.c
|
|
index 65e235f..f14a220 100644
|
|
--- a/pcap-rpcap.c
|
|
+++ b/pcap-rpcap.c
|
|
@@ -2276,7 +2276,7 @@ pcap_t *pcap_open_rpcap(const char *source, int snaplen, int flags, int read_tim
|
|
goto error;
|
|
|
|
/* Discard the rest of the message, if there is any. */
|
|
- if (rpcap_discard(pr->rmt_sockctrl, plen, errbuf) == -1)
|
|
+ if (rpcap_discard(sockctrl, plen, errbuf) == -1)
|
|
goto error_nodiscard;
|
|
|
|
/* Set proper fields into the pcap_t struct */
|
|
@@ -2314,7 +2314,7 @@ error:
|
|
* We already reported an error; if this gets an error, just
|
|
* drive on.
|
|
*/
|
|
- (void)rpcap_discard(pr->rmt_sockctrl, plen, NULL);
|
|
+ (void)rpcap_discard(sockctrl, plen, NULL);
|
|
|
|
error_nodiscard:
|
|
if (!active)
|
|
--
|
|
1.8.3.1
|
|
|