diff options
author | Michael Mann <mmann78@netscape.net> | 2013-09-24 21:06:05 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-09-24 21:06:05 +0000 |
commit | f92832c8f45a49fadb3ae4ba352d4d967b796b0f (patch) | |
tree | 59a88e9879ef43ac39b6eb1e1a4aed1791e86922 /plugins | |
parent | 9e24ed6e97e870fa765457ea8bc2c5b42b6f59b1 (diff) |
Prevent crashing as a result of tree removal in r52208. Tree removal + this patch should be the "quick" fix to bug 5349 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5349). I knew the tree check was preventing some dissection/column data/etc, but from the comments in bug 5349, the tree check was also protecting this (and maybe other) crashes (due to missed NULL checking).
I want to follow up with some massive cleanup (remove PITEM_FINFO calls), but this with r52208 should be good enough to backport to 1.8 and 1.10 to fix bug 5349. Cleanup shouldn't need to be backported.
svn path=/trunk/; revision=52209
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/wimax/packet-wmx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/wimax/packet-wmx.c b/plugins/wimax/packet-wmx.c index 4e881f05f1..c4b15c8870 100644 --- a/plugins/wimax/packet-wmx.c +++ b/plugins/wimax/packet-wmx.c @@ -630,7 +630,7 @@ proto_tree *add_tlv_subtree(tlv_info_t *self, gint idx, proto_tree *tree, int hf /* display the TLV name and display the value in hex. Highlight type, length, and value. */ tlv_item = proto_tree_add_item(tree, hfindex, tvb, start, tlv_value_length, little_endian); - if (!PITEM_FINFO(tlv_item)) + if ((tlv_item == NULL) || (!PITEM_FINFO(tlv_item))) return tree; /* Correct the highlighting. */ @@ -729,7 +729,7 @@ proto_tree *add_protocol_subtree(tlv_info_t *self, gint idx, proto_tree *tree, i va_end(ap); tlv_item = proto_tree_add_protocol_format(tree, hfindex, tvb, start, length, "%s", message); - if (!PITEM_FINFO(tlv_item)) + if ((tlv_item == NULL) || (!PITEM_FINFO(tlv_item))) return tree; /* Correct the highlighting. */ |