diff options
author | Evan Huus <eapache@gmail.com> | 2012-10-28 20:23:06 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-10-28 20:23:06 +0000 |
commit | 4105ae6c6c83df55336eb1b4607c187fa229c8a1 (patch) | |
tree | 77694836614383a5c6fb84d4b7e3a4fe341a35a2 /epan/dissectors/packet-mip6.c | |
parent | 953283a3d7c7b7b9c86ae7127ba48c08f4bc65eb (diff) | |
download | wireshark-4105ae6c6c83df55336eb1b4607c187fa229c8a1.tar.gz |
Fix null-pointer dereference in mip6 dissector when optp is NULL because
we don't recognize the option.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7922
svn path=/trunk/; revision=45822
Diffstat (limited to 'epan/dissectors/packet-mip6.c')
-rw-r--r-- | epan/dissectors/packet-mip6.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mip6.c b/epan/dissectors/packet-mip6.c index 33c29bdac6..225113958a 100644 --- a/epan/dissectors/packet-mip6.c +++ b/epan/dissectors/packet-mip6.c @@ -3148,7 +3148,7 @@ dissect_mipv6_options(tvbuff_t *tvb, int offset, guint length, } else { ti = proto_tree_add_text(opt_tree, tvb, offset, len + 2, "%s", val_to_str_ext_const(opt, &mip6_mobility_options_ext, "<unknown>")); - if (*optp->subtree_index) { + if (optp && *optp->subtree_index) { opt_data_tree = proto_item_add_subtree(ti, *optp->subtree_index); } proto_tree_add_item(opt_data_tree, hf_mip6_mobility_opt, tvb, offset, 1, ENC_BIG_ENDIAN); |