Reject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53732
This commit is contained in:
parent
ba0e04ed1b
commit
99d9c3d0f5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue