diff options
author | sadag <sadasg@gmail.com> | 2016-05-20 04:26:27 -0700 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2016-05-20 14:26:27 +0300 |
commit | ad5ae47a0d159ea473c9730d7e0298a3e5d31cf6 (patch) | |
tree | fd30a81aed610de38bc2364d1345d96ba2d3f456 | |
parent | 35b132e8ad3c50614605e00cf8ff20988094d21c (diff) |
sd-dhcp-client: fix busy loop reading zero sized DHCP UDP packets. (#3299)
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 3846cf7476..123169832c 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -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; |