diff options
Diffstat (limited to 'epan/dissectors/packet-drda.c')
-rw-r--r-- | epan/dissectors/packet-drda.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-drda.c b/epan/dissectors/packet-drda.c index c82565c771..93eb7ccb4f 100644 --- a/epan/dissectors/packet-drda.c +++ b/epan/dissectors/packet-drda.c @@ -694,7 +694,7 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ iPreviousFrameNumber = pinfo->fd->num; /* There may be multiple DRDA commands in one frame */ - while ((guint) (offset + 10) <= tvb_length(tvb)) + while ((guint) (offset + 10) <= tvb_captured_length(tvb)) { iCommand = tvb_get_ntohs(tvb, offset + 8); iLength = tvb_get_ntohs(tvb, offset + 0); @@ -747,11 +747,11 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ /* The number of attributes is variable */ for (offset += 10; offset < iCommandEnd; ) { - if (tvb_length_remaining(tvb, offset) >= 2) + if (tvb_captured_length_remaining(tvb, offset) >= 2) { iLengthParam = tvb_get_ntohs(tvb, offset + 0); if (iLengthParam == 0 || iLengthParam == 1) iLengthParam = iLength - 10; - if (tvb_length_remaining(tvb, offset) >= iLengthParam) + if (tvb_captured_length_remaining(tvb, offset) >= iLengthParam) { iParameterCP = tvb_get_ntohs(tvb, offset + 2); ti = proto_tree_add_text(drdaroot_tree, tvb, offset, iLengthParam, @@ -787,13 +787,13 @@ dissect_drda(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_ } } - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint get_drda_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb, int offset) { - if (tvb_length_remaining(tvb, offset) >= 10) + if (tvb_captured_length_remaining(tvb, offset) >= 10) { return (tvb_get_ntohs(tvb, offset)); } @@ -804,7 +804,7 @@ static int dissect_drda_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) { tcp_dissect_pdus(tvb, pinfo, tree, drda_desegment, 10, get_drda_pdu_len, dissect_drda, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } @@ -812,7 +812,7 @@ static gboolean dissect_drda_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { conversation_t * conversation; - if (tvb_length(tvb) >= 10) + if (tvb_captured_length(tvb) >= 10) { /* The first header is 6 bytes long, so the length in the second header should 6 bytes less */ guint16 cOuterLength, cInnerLength; |