diff options
Diffstat (limited to '')
-rw-r--r-- | epan/dissectors/packet-h264.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/epan/dissectors/packet-h264.c b/epan/dissectors/packet-h264.c index 9d9a125..8ca3f5e 100644 --- a/epan/dissectors/packet-h264.c +++ b/epan/dissectors/packet-h264.c @@ -561,17 +561,20 @@ dissect_h264_exp_golomb_code(proto_tree *tree, int hf_index, tvbuff_t *tvb, gint start_offset = *start_bit_offset>>3; - if (hf_index > -1) + if (hf_index > -1) { hf_field = proto_registrar_get_nth(hf_index); + } - switch (descriptor) { - case H264_SE_V: - DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32); - break; + if (hf_field) { + switch (descriptor) { + case H264_SE_V: + DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_INT32); + break; - default: - DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32); - break; + default: + DISSECTOR_ASSERT_FIELD_TYPE(hf_field, FT_UINT32); + break; + } } bit_offset = *start_bit_offset; @@ -2131,6 +2134,7 @@ static int dissect_h264_prefix(proto_tree *tree, tvbuff_t *tvb, packet_info *pin /* RFC 6190 Section: 4.9 - Payload Content Scalability Information (PACSI) */ static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_h264_pacsi(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint offset) { gint8 pacsi_flags; @@ -2201,6 +2205,7 @@ dissect_h264_pacsi(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, gint off * RFC 3984 Section 5.7.1 - Single-Time Aggregation Packet (STAP) */ static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_h264_stap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset, gint8 nal_type) { guint16 nal_unit_size; @@ -2246,6 +2251,7 @@ dissect_h264_stap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint * RFC 3984 Section 5.7.2 Multi-Time Aggregation Packet (MTAP) */ static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_h264_mtap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset, gint8 nal_type) { gint size_offset; @@ -2303,6 +2309,7 @@ dissect_h264_mtap(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint * Dissect NAL Header extension and NI-MTAP Subtype defined in RFC 6190 */ static void +// NOLINTNEXTLINE(misc-no-recursion) dissect_h264_nalu_extension (proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo _U_, gint offset) { gint size_offset; @@ -2545,6 +2552,7 @@ dissect_h264_bytestream(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi /* Code to actually dissect the packets */ static int +// NOLINTNEXTLINE(misc-no-recursion) dissect_h264(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { int offset = 0; @@ -2615,6 +2623,7 @@ dissect_h264(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ rbsp_tvb = dissect_h265_unescap_nal_unit(tvb, pinfo, offset); stream_tree = proto_tree_add_subtree(h264_tree, tvb, offset, -1, ett_h264_stream, NULL, "H264 NAL Unit Payload"); + increment_dissection_depth(pinfo); switch (type) { case 1: /* 1 Coded slice of a non-IDR picture */ dissect_h264_slice_layer_without_partitioning_rbsp(stream_tree, rbsp_tvb, pinfo, 0); @@ -2660,6 +2669,7 @@ dissect_h264(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ default: break; } + decrement_dissection_depth(pinfo); } /* if (tree) */ return tvb_captured_length(tvb); } |