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

This commit is contained in:
sadag 2016-05-20 04:26:27 -07:00 committed by Evgeny Vereshchagin
parent 35b132e8ad
commit ad5ae47a0d
1 changed files with 3 additions and 0 deletions

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;