aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rdp_drdynvc.c
diff options
context:
space:
mode:
authorDavid Fort <contact@hardening-consulting.com>2023-10-26 12:46:44 +0200
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2023-10-26 18:57:24 +0000
commitbaa9f5b249b56a4f795da7f340b1808f3542f210 (patch)
tree6cfae6a9475d92de75fe1e52d8fae0322f73cdfb /epan/dissectors/packet-rdp_drdynvc.c
parent4a3472b9d46342be1635fa6c0f8e674e11fe4b42 (diff)
rdp: fix segfaults when decoding egfx packets
Some checks were missing when decoding zgfx compressed packets.
Diffstat (limited to 'epan/dissectors/packet-rdp_drdynvc.c')
-rw-r--r--epan/dissectors/packet-rdp_drdynvc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rdp_drdynvc.c b/epan/dissectors/packet-rdp_drdynvc.c
index 3a18877e25..ddd3ec4b64 100644
--- a/epan/dissectors/packet-rdp_drdynvc.c
+++ b/epan/dissectors/packet-rdp_drdynvc.c
@@ -519,10 +519,12 @@ dissect_rdp_drdynvc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
pduInfo = (drdynvc_pdu_info_t*)wmem_tree_lookup32(drdynvcPinfo->pdus, key);
}
- proto_item_set_generated(
- proto_tree_add_string_format_value(tree, hf_rdp_drdynvc_data_progress, tvb, offset, 0, NULL, "%d-%d/%d",
+ if (pduInfo) {
+ proto_item_set_generated(
+ proto_tree_add_string_format_value(tree, hf_rdp_drdynvc_data_progress, tvb, offset, 0, NULL, "%d-%d/%d",
pduInfo->progress, pduInfo->progress + payloadLen, pduInfo->packetLen)
- );
+ );
+ }
if (!pduInfo->fragmented)
targetTvb = tvb_new_subset_remaining(tvb, offset);