No need to check whether atm_info is null in that code path.
authorGuy Harris <guy@alum.mit.edu>
Sun, 6 Jan 2019 19:05:54 +0000 (11:05 -0800)
committerGuy Harris <guy@alum.mit.edu>
Sun, 6 Jan 2019 19:06:40 +0000 (19:06 +0000)
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 <guy@alum.mit.edu>
epan/dissectors/packet-atm.c

index d4cbf42c87629eea653fd66a2d156a2677dab82a..968ff923ca35f71b0dcc74ae42f812d567f5fe26 100644 (file)
@@ -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;
   }