projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1801580
)
Fix end pointer passed from dhcpv6_handle_reply() to dhcpv6_parse_ia()
author
Ben Hutchings
<ben@decadent.org.uk>
Thu, 28 Jan 2016 22:45:39 +0000
(22:45 +0000)
committer
Ben Hutchings
<ben@decadent.org.uk>
Thu, 28 Jan 2016 22:50:04 +0000
(22:50 +0000)
The end of the IA option is odata + olen; there's no need to add anything.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
src/dhcpv6.c
patch
|
blob
|
history
diff --git
a/src/dhcpv6.c
b/src/dhcpv6.c
index e27d8995a40102a5446816334fb3e3843819e311..c5f11f13141dfeb87c4eff4ddb82890ae49b16c2 100644
(file)
--- a/
src/dhcpv6.c
+++ b/
src/dhcpv6.c
@@
-989,7
+989,7
@@
static int dhcpv6_handle_reply(enum dhcpv6_msg orig, _unused const int rc,
if (code != DHCPV6_Success)
continue;
- dhcpv6_parse_ia(ia_hdr, odata + olen
+ sizeof(*ia_hdr)
);
+ dhcpv6_parse_ia(ia_hdr, odata + olen);
passthru = false;
} else if (otype == DHCPV6_OPT_STATUS && olen >= 2) {
uint8_t *mdata = (olen > 2) ? &odata[2] : NULL;