From 0a187bdd4162d605c3d5791a174a4e5152dcf8bb Mon Sep 17 00:00:00 2001 From: Tim Bateman Date: Tue, 3 Dec 2013 10:46:32 -0500 Subject: [PATCH] Fixed one byte stack overflow in mcast recvfrom. The actual overflow happens when enforcing the NULL termination shortly after the recvfrom. --- api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api.c b/api.c index 9c0cdc9f..24f1e6f9 100644 --- a/api.c +++ b/api.c @@ -3564,7 +3564,7 @@ static void mcast() count++; came_from_siz = sizeof(came_from); - if (SOCKETFAIL(rep = recvfrom(mcast_sock, buf, sizeof(buf), + if (SOCKETFAIL(rep = recvfrom(mcast_sock, buf, sizeof(buf) - 1, 0, (struct sockaddr *)(&came_from), &came_from_siz))) { applog(LOG_DEBUG, "API mcast failed count=%d (%s) (%d)", count, SOCKERRMSG, (int)mcast_sock);