commit | 499d8dde2b1a216eab9252ee500cc31b8c2b2974 | [log] [tgz] |
---|---|---|
author | yiwenchen <yiwenchen@synology.com> | Wed Feb 14 22:26:54 2018 +0000 |
committer | Simon Kelley <simon@thekelleys.org.uk> | Wed Feb 14 22:26:54 2018 +0000 |
tree | 04c77642e4be0eee6acb7e8e60e268cbc76cb2df | |
parent | 6f1cbfd000ba9535b125fe68f30d78155f39c0db [diff] |
Fix boundary for test introduced in 3e3f1029c9ec6c63e430ff51063a6301d4b2262 This fixes breakage of DHCPv6 relay.
diff --git a/src/rfc3315.c b/src/rfc3315.c index c3c1c95..21fcd9b 100644 --- a/src/rfc3315.c +++ b/src/rfc3315.c
@@ -216,9 +216,9 @@ for (opt = opts; opt; opt = opt6_next(opt, end)) { - if (opt6_ptr(opt, 0) + opt6_len(opt) >= end) { + if (opt6_ptr(opt, 0) + opt6_len(opt) > end) return 0; - } + int o = new_opt6(opt6_type(opt)); if (opt6_type(opt) == OPTION6_RELAY_MSG) {