diff options
Diffstat (limited to 'src')
-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; |