aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthfp.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-02 21:34:23 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-12-02 21:34:23 +0000
commitae2e12d1f7095afd8ad9dedfb51a5cc1cd29105e (patch)
treec15cb0980d27620505b28c129e9e0df191ef7f19 /epan/dissectors/packet-bthfp.c
parentce7b83123c75cfcae511f8018a9d4f0594b3a25f (diff)
Reject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53735
Diffstat (limited to 'epan/dissectors/packet-bthfp.c')
-rw-r--r--epan/dissectors/packet-bthfp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-bthfp.c b/epan/dissectors/packet-bthfp.c
index 6294a1d886..ba81b22339 100644
--- a/epan/dissectors/packet-bthfp.c
+++ b/epan/dissectors/packet-bthfp.c
@@ -1164,6 +1164,11 @@ dissect_bthfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
guint reassemble_start_offset = 0;
guint reassemble_end_offset = 0;
+ /* Reject the packet if data is NULL */
+ if (data == NULL)
+ return 0;
+ rfcomm_data = (btrfcomm_data_t *) data;
+
main_item = proto_tree_add_item(tree, proto_bthfp, tvb, 0, -1, ENC_NA);
main_tree = proto_item_add_subtree(main_item, ett_bthfp);
@@ -1181,9 +1186,6 @@ dissect_bthfp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
break;
}
- rfcomm_data = (btrfcomm_data_t *) data;
- DISSECTOR_ASSERT(rfcomm_data);
-
interface_id = rfcomm_data->interface_id;
adapter_id = rfcomm_data->adapter_id;
chandle = rfcomm_data->chandle;