From 4105ae6c6c83df55336eb1b4607c187fa229c8a1 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Sun, 28 Oct 2012 20:23:06 +0000 Subject: 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 --- epan/dissectors/packet-mip6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/dissectors/packet-mip6.c') 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, "")); - 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); -- cgit v1.2.1