diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-02 21:13:29 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-02 21:13:29 +0000 |
commit | b5e37755356964c44c66b057fce871a43ad8afd1 (patch) | |
tree | faba90e656e5be43e1bba9bfd94418848ffbea9e /epan/dissectors/packet-bthci_acl.c | |
parent | 99d9c3d0f5d9541cbad0a8904e3bd113b8010c28 (diff) |
eject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53733
Diffstat (limited to 'epan/dissectors/packet-bthci_acl.c')
-rw-r--r-- | epan/dissectors/packet-bthci_acl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index c48ea26ee2..6970cbe9c0 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -118,6 +118,11 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat localhost_bdaddr_entry_t *localhost_bdaddr_entry; localhost_name_entry_t *localhost_name_entry; + /* Reject the packet if data is NULL */ + if (data == NULL) + return 0; + hci_data = (hci_data_t *) data; + ti = proto_tree_add_item(tree, proto_bthci_acl, tvb, offset, -1, ENC_NA); bthci_acl_tree = proto_item_add_subtree(ti, ett_bthci_acl); @@ -136,9 +141,6 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_ACL"); - hci_data = (hci_data_t *) data; - DISSECTOR_ASSERT(hci_data); - flags = tvb_get_letohs(tvb, offset); pb_flag = (flags & 0x3000) >> 12; proto_tree_add_item(bthci_acl_tree, hf_bthci_acl_chandle, tvb, offset, 2, ENC_LITTLE_ENDIAN); |