mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 14:28:12 +00:00
Fixed one byte stack overflow in mcast recvfrom.
The actual overflow happens when enforcing the NULL termination shortly after the recvfrom.
This commit is contained in:
parent
65d9136dd5
commit
0a187bdd41
2
api.c
2
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);
|
||||
|
Loading…
Reference in New Issue
Block a user