mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Check if allocation of 66573 bytes succeeded before accessing the memory to avoid crash in busy times
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
committed by
Simon Kelley
parent
eb88eed1fc
commit
c147329823
@@ -1863,7 +1863,7 @@ unsigned char *tcp_request(int confd, time_t now,
|
|||||||
int first, last;
|
int first, last;
|
||||||
unsigned int flags = 0;
|
unsigned int flags = 0;
|
||||||
|
|
||||||
if (getpeername(confd, (struct sockaddr *)&peer_addr, &peer_len) == -1)
|
if (!packet || getpeername(confd, (struct sockaddr *)&peer_addr, &peer_len) == -1)
|
||||||
return packet;
|
return packet;
|
||||||
|
|
||||||
#ifdef HAVE_CONNTRACK
|
#ifdef HAVE_CONNTRACK
|
||||||
|
|||||||
Reference in New Issue
Block a user