diff options
Diffstat (limited to 'epan/dissectors/packet-btavrcp.c')
-rw-r--r-- | epan/dissectors/packet-btavrcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-btavrcp.c b/epan/dissectors/packet-btavrcp.c index 4a3c8ffad6..2bcbad264f 100644 --- a/epan/dissectors/packet-btavrcp.c +++ b/epan/dissectors/packet-btavrcp.c @@ -2095,6 +2095,11 @@ dissect_btavrcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) guint32 psm; btavctp_data_t *avctp_data; + /* Reject the packet if data is NULL */ + if (data == NULL) + return 0; + avctp_data = (btavctp_data_t *) data; + ti = proto_tree_add_item(tree, proto_btavrcp, tvb, offset, -1, ENC_NA); btavrcp_tree = proto_item_add_subtree(ti, ett_btavrcp); @@ -2113,9 +2118,6 @@ dissect_btavrcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) break; } - avctp_data = (btavctp_data_t *) data; - DISSECTOR_ASSERT(avctp_data); - is_command = !avctp_data->cr; interface_id = avctp_data->interface_id; |