From 976130ddf8b4882b1a5bb43453b66aa0e5ddddb4 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Wed, 10 Jun 2020 21:27:11 +0200 Subject: acdr: check existence of last_child before using it. Bug: 16628 Change-Id: Idb6e781d4491e3b5ad52d85c35cf38115a119d10 Reviewed-on: https://code.wireshark.org/review/37478 Reviewed-by: Orgad Shaneh Petri-Dish: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Dario Lombardo --- epan/dissectors/packet-acdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/dissectors/packet-acdr.c b/epan/dissectors/packet-acdr.c index fee43909b9..e74959652e 100644 --- a/epan/dissectors/packet-acdr.c +++ b/epan/dissectors/packet-acdr.c @@ -866,7 +866,7 @@ dissect_rtp_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 m call_dissector(rtp_dissector_handle, tvb, pinfo, tree); // see that the bottom protocol is indeed RTP and not some other protocol on top RTP - if (tree) { + if (tree && tree->last_child) { if (!strncmp(tree->last_child->finfo->hfinfo->name, "Real-Time Transport Protocol", 28)) { // add the length & offset fields to the RTP payload rtp_data_tree = tree->last_child->last_child; // the rtp subtree->the payload field -- cgit v1.2.3