X-Git-Url: https://git.decadent.org.uk/gitweb/?p=odhcp6c.git;a=blobdiff_plain;f=src%2Fdhcpv6.c;h=8d65219eb8d4ccfe073ab214750aef49f9f9380a;hp=cd8e43800dca33315047cd000262a5697c985be5;hb=163c4ef809bae670524df2d55e24635dd78bfd34;hpb=68ac18ed5d5b4c2d403396764f08c92a160b4a18 diff --git a/src/dhcpv6.c b/src/dhcpv6.c index cd8e438..8d65219 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -623,7 +623,7 @@ static bool dhcpv6_response_is_valid(const void *buf, ssize_t len, } } - if (!options_valid) + if (!options_valid || ((odata + olen) > end)) return false; if (type == DHCPV6_MSG_INFO_REQ && ia_present)