From: Alan T. DeKok Date: Thu, 21 Jan 2021 20:29:39 +0000 (-0500) Subject: header is at least 4 bytes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64460cd90227ca22f09acc77ec9a8b8709b0625d;p=thirdparty%2Ffreeradius-server.git header is at least 4 bytes --- diff --git a/src/protocols/dhcpv6/base.c b/src/protocols/dhcpv6/base.c index ed5b4a35fbd..bd2281e6e77 100644 --- a/src/protocols/dhcpv6/base.c +++ b/src/protocols/dhcpv6/base.c @@ -637,7 +637,7 @@ ssize_t fr_dhcpv6_decode(TALLOC_CTX *ctx, uint8_t const *packet, size_t packet_l fr_dhcpv6_decode_ctx_t packet_ctx; fr_pair_t *vp; - if (!packet_len) return 0; /* protect access to packet[0] */ + if (packet_len < DHCPV6_HDR_LEN) return 0; /* protect access to packet[0] */ /* * Get the packet type.