aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-rdp_drdynvc.c8
-rw-r--r--epan/tvbuff_rdp.c3
2 files changed, 8 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);
diff --git a/epan/tvbuff_rdp.c b/epan/tvbuff_rdp.c
index 4a7ce5c7ff..4beb24c59d 100644
--- a/epan/tvbuff_rdp.c
+++ b/epan/tvbuff_rdp.c
@@ -444,6 +444,9 @@ rdp8_decompress_segment(zgfx_context_t *zgfx, tvbuff_t *tvb)
return FALSE;
}
+ if (count > sizeof(zgfx->outputSegment) - zgfx->outputCount)
+ return FALSE;
+
if (!zgfx_write_from_history(zgfx, distance, count))
return FALSE;
} else {