summaryrefslogtreecommitdiff
path: root/pcap-rpcap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2022-08-06 03:40:23 -0700
committerGuy Harris <gharris@sonic.net>2022-08-06 03:40:23 -0700
commit26b8f2e55c25a0c6a1e17d2e9590063224890d6a (patch)
tree38574bf42f9f1dea355b601e52a7476b1100ce5f /pcap-rpcap.c
parentf2182e5cef559b1fc7b6f02b4c05d93a80203432 (diff)
downloadlibpcap-26b8f2e55c25a0c6a1e17d2e9590063224890d6a.tar.gz
rpcap: report an error message for a bad authentication reply size.
We weren't providng an error message for this case.
Diffstat (limited to 'pcap-rpcap.c')
-rw-r--r--pcap-rpcap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pcap-rpcap.c b/pcap-rpcap.c
index 5b45b829..c85acc2c 100644
--- a/pcap-rpcap.c
+++ b/pcap-rpcap.c
@@ -2075,6 +2075,8 @@ static int rpcap_doauth(SOCKET sockctrl, SSL *ssl, uint8_t *ver, struct pcap_rmt
if (plen < sizeof(struct rpcap_authreply))
{
/* No - discard it and fail. */
+ snprintf(errbuf, PCAP_ERRBUF_SIZE,
+ "Authenticaton reply from server is too short");
(void)rpcap_discard(sockctrl, ssl, plen, NULL);
return -1;
}