summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2018-06-07 22:36:29 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-06-07 22:37:30 +0200
commitc45e2eb865cffd3d2556efc39de02c9b0c56b79b (patch)
tree7a412ff89cd7cc9e48cc9d9c8911cd6406ed8238
parentc2ff5af44096a34423389be0ef64bfd2aa61371e (diff)
dhcpv6: fix out of bounds write in handle_nested_message()
Detected by Coverity in CID1412413 Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
-rw-r--r--src/dhcpv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 4e7d0d0..5549394 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -174,7 +174,7 @@ enum {
};
static void handle_nested_message(uint8_t *data, size_t len,
- uint8_t **opts, uint8_t **end, struct iovec iov[IOV_TOTAL - 1])
+ uint8_t **opts, uint8_t **end, struct iovec iov[IOV_TOTAL])
{
struct dhcpv6_relay_header *hdr = (struct dhcpv6_relay_header*)data;
if (iov[IOV_NESTED].iov_base == NULL) {