summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-26 13:07:30 +0100
committerTom Gundersen <teg@jklm.no>2015-10-30 12:32:49 +0100
commit93f660da98853995ee3ad4521112d2788eb0df53 (patch)
tree1a6fa079586fcb67af2d4fa0a561f2ed786d4afb /src
parentf833694d4f6a6dffabc6a4e552ecbd40aa3ce479 (diff)
sd-dhcp6-client: fix assert in options parsing
Diffstat (limited to 'src')
-rw-r--r--src/libsystemd-network/dhcp6-option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c
index 076bb2dac0..0f46df6a1b 100644
--- a/src/libsystemd-network/dhcp6-option.c
+++ b/src/libsystemd-network/dhcp6-option.c
@@ -344,7 +344,7 @@ int dhcp6_option_parse_domainname(const uint8_t *optval, uint16_t optlen, char *
int r;
assert_return(optlen > 1, -ENODATA);
- assert_return(optval[optlen] == '\0', -EINVAL);
+ assert_return(optval[optlen - 1] == '\0', -EINVAL);
while (pos < optlen) {
_cleanup_free_ char *ret = NULL;