]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Add a bounds check.
authorGuy Harris <[email protected]>
Thu, 6 Oct 2016 07:11:56 +0000 (00:11 -0700)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 18 Jan 2017 08:16:40 +0000 (09:16 +0100)
The bounds check for the Hello packet options was missing.

print-ospf.c

index 03df0598e49aa21128abd4d7cf9bbbf45f4a5102..db4231ba0f85eec030c4fca34682cf4719c396dd 100644 (file)
@@ -996,6 +996,7 @@ ospf_decode_v2(netdissect_options *ndo,
                break;
 
        case OSPF_TYPE_HELLO:
+               ND_TCHECK(op->ospf_hello.hello_options);
                ND_PRINT((ndo, "\n\tOptions [%s]",
                          bittok2str(ospf_option_values,"none",op->ospf_hello.hello_options)));