diff options
author | Tom Gundersen <teg@jklm.no> | 2014-01-16 01:40:23 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-01-16 01:41:12 +0100 |
commit | b087416f97a2662d290dde1cd68c3134317d0b1f (patch) | |
tree | 8b3baf721e3b94b3daa19ce17037fa00ec4b9fce /src/libsystemd | |
parent | 31927c16deb4b0fdc887220df54505fd6993822f (diff) |
sd-dhcp-client: fix memory corruption
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-dhcp-client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-dhcp-client.c b/src/libsystemd/sd-dhcp-client.c index edfcb54a4c..1df89dc651 100644 --- a/src/libsystemd/sd-dhcp-client.c +++ b/src/libsystemd/sd-dhcp-client.c @@ -783,7 +783,7 @@ static int client_parse_offer(uint8_t code, uint8_t len, const uint8_t *option, memcpy(&lease->dns[i]->s_addr, option + 4 * i, 4); } - lease->dns[i + 1] = NULL; + lease->dns[len / 4] = NULL; } break; |