Reject the packet if data is NULL without doing anything else.

svn path=/trunk/; revision=53732
This commit is contained in:
Chris Maynard 2013-12-02 21:05:11 +00:00
parent ba0e04ed1b
commit 99d9c3d0f5
1 changed files with 5 additions and 3 deletions

View File

@ -132,6 +132,11 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
guint length;
guint i_frame;
/* Reject the packet if data is NULL */
if (data == NULL)
return 0;
l2cap_data = (btl2cap_data_t *) data;
ti = proto_tree_add_item(tree, proto_btavctp, tvb, offset, -1, ENC_NA);
btavctp_tree = proto_item_add_subtree(ti, ett_btavctp);
@ -151,9 +156,6 @@ dissect_btavctp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
break;
}
l2cap_data = (btl2cap_data_t *) data;
DISSECTOR_ASSERT(l2cap_data);
proto_tree_add_item(btavctp_tree, hf_btavctp_transaction, tvb, offset, 1, ENC_BIG_ENDIAN);
pitem = proto_tree_add_item(btavctp_tree, hf_btavctp_packet_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(btavctp_tree, hf_btavctp_cr, tvb, offset, 1, ENC_BIG_ENDIAN);