sd-dhcp-client: fix busy loop reading zero sized DHCP UDP packets. (#3299)

This commit is contained in:
sadag
2016-05-20 14:26:27 +03:00
committed by Evgeny Vereshchagin
parent 35b132e8ad
commit ad5ae47a0d
+3
View File
@@ -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;