sd-dhcp-client: fix busy loop reading zero sized DHCP UDP packets. (#3299)
This commit is contained in:
parent
35b132e8ad
commit
ad5ae47a0d
|
@ -1636,6 +1636,9 @@ static int client_receive_message_udp(
|
|||
if (buflen < 0)
|
||||
return buflen;
|
||||
|
||||
if (buflen == 0)
|
||||
buflen = 1;
|
||||
|
||||
message = malloc0(buflen);
|
||||
if (!message)
|
||||
return -ENOMEM;
|
||||
|
|
Loading…
Reference in New Issue