]> The Tcpdump Group git mirrors - tcpdump/commitdiff
print-dhcp6.c: add TCHECK(*dh6o) in dhcp6opt_print()
authorfxlb <[email protected]>
Mon, 26 Nov 2012 09:37:20 +0000 (10:37 +0100)
committerfxlb <[email protected]>
Mon, 26 Nov 2012 09:37:20 +0000 (10:37 +0100)
print-dhcp6.c

index 24b3f281347cfce20ae400aa7832b5fab455b598..8cdd887cc61bd2440c2ec21262707579066a22d0 100644 (file)
@@ -342,6 +342,7 @@ dhcp6opt_print(const u_char *cp, const u_char *ep)
                if (ep < cp + sizeof(*dh6o))
                        goto trunc;
                dh6o = (struct dhcp6opt *)cp;
+               TCHECK(*dh6o);
                optlen = EXTRACT_16BITS(&dh6o->dh6opt_len);
                if (ep < cp + sizeof(*dh6o) + optlen)
                        goto trunc;