From de71f0e16da046187ce5990b2c6a0098af6d4817 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 6 Jan 2019 11:05:54 -0800 Subject: No need to check whether atm_info is null in that code path. All exported (via dissector tables and dissector handles) routines that call dissect_atm_common() first do DISSECTOR_ASSERT(atm_info != NULL), so dissect_atm_common() will never be called iwth a null data pointer. dissect_reassembled_pdu() is called only from dissect_atm_common(), so it also won't ever be called with a non-null data pointer. Fixes Coverity CID 1442299. Change-Id: I3b455ac546a6a0cd6aa8ef184c71fda2ca2a0710 Reviewed-on: https://code.wireshark.org/review/31418 Reviewed-by: Guy Harris --- epan/dissectors/packet-atm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-atm.c') diff --git a/epan/dissectors/packet-atm.c b/epan/dissectors/packet-atm.c index d4cbf42c87..968ff923ca 100644 --- a/epan/dissectors/packet-atm.c +++ b/epan/dissectors/packet-atm.c @@ -933,9 +933,9 @@ dissect_reassembled_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, * First check whether custom dissection table * was set up to dissect this VPI+VCI combination */ - if (atm_info && dissector_try_uint_new(atm_reassembled_vpi_vci_table, - ((atm_info->vpi) << 16) | atm_info->vci, - next_tvb, pinfo, tree, TRUE, atm_info)) + if (dissector_try_uint_new(atm_reassembled_vpi_vci_table, + ((atm_info->vpi) << 16) | atm_info->vci, + next_tvb, pinfo, tree, TRUE, atm_info)) { return; } -- cgit v1.2.3