summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-26 17:44:17 +0000
commit2d78050fd56b8188aa5a65ad2667e301b60eea45 (patch)
treeb54d4adac6de0a196b8bb8a67b34fe186c21378f /epan/dissectors/asn1
parentAdding upstream version 4.2.2. (diff)
downloadwireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.tar.xz
wireshark-2d78050fd56b8188aa5a65ad2667e301b60eea45.zip
Adding upstream version 4.2.4.upstream/4.2.4
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1')
-rw-r--r--epan/dissectors/asn1/kerberos/packet-kerberos-template.c2
-rw-r--r--epan/dissectors/asn1/mpeg-pes/packet-mpeg-pes-template.c3
-rw-r--r--epan/dissectors/asn1/snmp/packet-snmp-template.c10
-rw-r--r--epan/dissectors/asn1/t38/packet-t38-template.c5
-rw-r--r--epan/dissectors/asn1/tcap/packet-tcap-template.c3
5 files changed, 16 insertions, 7 deletions
diff --git a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c
index 4964637..2b5a906 100644
--- a/epan/dissectors/asn1/kerberos/packet-kerberos-template.c
+++ b/epan/dissectors/asn1/kerberos/packet-kerberos-template.c
@@ -2074,7 +2074,7 @@ verify_krb5_pac_ticket_checksum(proto_tree *tree _U_,
}
checksum.length = MIN(checksum.length, (unsigned int)checksum_length);
- tepdata.data = (void *)(uintptr_t)tepbuffer;
+ tepdata.data = (void *)tepbuffer;
tepdata.length = teplength;
ret = decode_krb5_enc_tkt_part(&tepdata, &tep);
diff --git a/epan/dissectors/asn1/mpeg-pes/packet-mpeg-pes-template.c b/epan/dissectors/asn1/mpeg-pes/packet-mpeg-pes-template.c
index c4e8990..680fa91 100644
--- a/epan/dissectors/asn1/mpeg-pes/packet-mpeg-pes-template.c
+++ b/epan/dissectors/asn1/mpeg-pes/packet-mpeg-pes-template.c
@@ -399,6 +399,7 @@ static int
dissect_mpeg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data);
static gboolean
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
{
int prefix;
@@ -434,6 +435,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
offset = dissect_mpeg_pes_PES(tvb, offset, &asn1_ctx,
tree, proto_mpeg_pes);
+ increment_dissection_depth(pinfo);
if (stream == STREAM_PICTURE) {
int frame_type;
@@ -598,6 +600,7 @@ dissect_mpeg_pes(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_tree_add_item(tree, hf_mpeg_pes_data, tvb,
offset / 8, -1, ENC_NA);
}
+ decrement_dissection_depth(pinfo);
return TRUE;
}
diff --git a/epan/dissectors/asn1/snmp/packet-snmp-template.c b/epan/dissectors/asn1/snmp/packet-snmp-template.c
index e8e606e..96a4a4a 100644
--- a/epan/dissectors/asn1/snmp/packet-snmp-template.c
+++ b/epan/dissectors/asn1/snmp/packet-snmp-template.c
@@ -411,12 +411,9 @@ snmp_match_request_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
{
proto_item *it;
- // if it is a request
- if (srrp->request_frame_id == pinfo->fd->num)
+ // if it is the response
+ if (srrp->response_frame_id == pinfo->fd->num)
{
- it=proto_tree_add_uint(tree, hf_snmp_response_in, tvb, 0, 0, srrp->response_frame_id);
- proto_item_set_generated(it);
- } else {
nstime_t ns;
it=proto_tree_add_uint(tree, hf_snmp_response_to, tvb, 0, 0, srrp->request_frame_id);
proto_item_set_generated(it);
@@ -425,6 +422,9 @@ snmp_match_request_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
proto_item_set_generated(it);
return srrp;
+ } else {
+ it=proto_tree_add_uint(tree, hf_snmp_response_in, tvb, 0, 0, srrp->response_frame_id);
+ proto_item_set_generated(it);
}
}
diff --git a/epan/dissectors/asn1/t38/packet-t38-template.c b/epan/dissectors/asn1/t38/packet-t38-template.c
index ad46a99..852885c 100644
--- a/epan/dissectors/asn1/t38/packet-t38-template.c
+++ b/epan/dissectors/asn1/t38/packet-t38-template.c
@@ -250,6 +250,7 @@ void t38_add_address(packet_info *pinfo,
p_conversation_data->setup_frame_number = setup_frame_number;
p_conversation_data->src_t38_info.reass_ID = 0;
p_conversation_data->src_t38_info.reass_start_seqnum = -1;
+ p_conversation_data->src_t38_info.reass_start_data_field = 0;
p_conversation_data->src_t38_info.reass_data_type = 0;
p_conversation_data->src_t38_info.last_seqnum = -1;
p_conversation_data->src_t38_info.packet_lost = 0;
@@ -261,6 +262,7 @@ void t38_add_address(packet_info *pinfo,
p_conversation_data->dst_t38_info.reass_ID = 0;
p_conversation_data->dst_t38_info.reass_start_seqnum = -1;
+ p_conversation_data->dst_t38_info.reass_start_data_field = 0;
p_conversation_data->dst_t38_info.reass_data_type = 0;
p_conversation_data->dst_t38_info.last_seqnum = -1;
p_conversation_data->dst_t38_info.packet_lost = 0;
@@ -323,8 +325,9 @@ force_reassemble_seq(reassembly_table *table, packet_info *pinfo, guint32 id)
last_fd=fd_i;
}
- data = (guint8 *) wmem_alloc(pinfo->pool, size);
+ data = (guint8 *) g_malloc(size);
fd_head->tvb_data = tvb_new_real_data(data, size, size);
+ tvb_set_free_cb(fd_head->tvb_data, g_free);
fd_head->len = size; /* record size for caller */
/* add all data fragments */
diff --git a/epan/dissectors/asn1/tcap/packet-tcap-template.c b/epan/dissectors/asn1/tcap/packet-tcap-template.c
index 65efb15..9748549 100644
--- a/epan/dissectors/asn1/tcap/packet-tcap-template.c
+++ b/epan/dissectors/asn1/tcap/packet-tcap-template.c
@@ -2114,6 +2114,7 @@ static void cleanup_tcap(void)
}
static int
+// NOLINTNEXTLINE(misc-no-recursion)
dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset)
{
gint tag_offset, saved_offset, len_offset;
@@ -2156,7 +2157,9 @@ dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset
if (len-(2*ind_field)) /*should always be positive unless we get an empty contructor pointless? */
{
next_tvb = tvb_new_subset_length(tvb, offset, len-(2*ind_field));
+ increment_dissection_depth(actx->pinfo);
dissect_tcap_param(actx, subtree,next_tvb,0);
+ decrement_dissection_depth(actx->pinfo);
}
if (ind_field)