aboutsummaryrefslogtreecommitdiff
path: root/rpcapd
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-02-26 23:25:57 -0800
committerGuy Harris <gharris@sonic.net>2021-02-26 23:25:57 -0800
commitaa976ae12ccf81fd5a850e8eb1a8e7a1b5bb5445 (patch)
tree1601f2f38277ee26248d2b961b9e197b0997fab4 /rpcapd
parentc9ff515176e49258ce6387928700ff82fc108bb6 (diff)
rpcapd: fix bogus error message buffer argument.
Probably a copy-and-pasteo; we were passing the result of pcap_geterr(session->fp), which is the error buffer for the pcap_t being used for the capture, to sock_send(), when we *should* have been using the errbuf variable. Fixes Coverity CID 1472849.
Diffstat (limited to 'rpcapd')
-rw-r--r--rpcapd/daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rpcapd/daemon.c b/rpcapd/daemon.c
index 3bcc7337..e2b20a93 100644
--- a/rpcapd/daemon.c
+++ b/rpcapd/daemon.c
@@ -2421,7 +2421,7 @@ daemon_msg_updatefilter_req(uint8 ver, struct daemon_slpars *pars,
// A response is needed, otherwise the other host does not know that everything went well
rpcap_createhdr(&header, ver, RPCAP_MSG_UPDATEFILTER_REPLY, 0, 0);
- if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), pcap_geterr(session->fp), PCAP_ERRBUF_SIZE))
+ if (sock_send(pars->sockctrl, pars->ssl, (char *) &header, sizeof (struct rpcap_header), errbuf, PCAP_ERRBUF_SIZE))
{
// That failed; log a message and give up.
rpcapd_log(LOGPRIO_ERROR, "Send to client failed: %s", errbuf);