summaryrefslogtreecommitdiff
path: root/print-dhcp6.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-01-14 02:04:20 -0800
committerFrancois-Xavier Le Bail <fx.lebail@yahoo.com>2017-01-18 09:16:42 +0100
commite7f2e5fdab1dd0eb44eed21410a33bd4e7972ef2 (patch)
tree6f8735f24f7417e9c5067fb53629a05b11baa959 /print-dhcp6.c
parentd33705dab664019c1f602d8c5220288be1f49822 (diff)
downloadtcpdump-e7f2e5fdab1dd0eb44eed21410a33bd4e7972ef2.tar.gz
Make sure we have the entire option before printing it.
Diffstat (limited to 'print-dhcp6.c')
-rw-r--r--print-dhcp6.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/print-dhcp6.c b/print-dhcp6.c
index 16f82542..78b82ee3 100644
--- a/print-dhcp6.c
+++ b/print-dhcp6.c
@@ -304,6 +304,7 @@ dhcp6opt_print(netdissect_options *ndo,
goto trunc;
opttype = EXTRACT_16BITS(&dh6o->dh6opt_type);
ND_PRINT((ndo, " (%s", tok2str(dh6opt_str, "opt_%u", opttype)));
+ ND_TCHECK2(*(cp + sizeof(*dh6o)), optlen);
switch (opttype) {
case DH6OPT_CLIENTID:
case DH6OPT_SERVERID: