diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-22 17:05:37 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 00:06:19 +0000 |
commit | 67ab8a059c489022aebe0e27d1f937c7b6abad06 (patch) | |
tree | 6b6cb9e97c0b56ac14ea8224760356e1c5965748 /epan/dissectors/packet-rsh.c | |
parent | a43682d4fd9075f07f8dce1ddc5bda3e07296c27 (diff) |
Remove more deprecated tvb_length
Change-Id: I36603453c2563406f82663683930088dedd5f39c
Reviewed-on: https://code.wireshark.org/review/9041
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-rsh.c')
-rw-r--r-- | epan/dissectors/packet-rsh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-rsh.c b/epan/dissectors/packet-rsh.c index 26ec6e3c17..1653c77e2a 100644 --- a/epan/dissectors/packet-rsh.c +++ b/epan/dissectors/packet-rsh.c @@ -228,12 +228,12 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * then it must be session data only and we can skip looking * for the other fields. */ - if(tvb_find_guint8(tvb, tvb_length(tvb)-1, 1, '\0') == -1){ + if(tvb_find_guint8(tvb, tvb_captured_length(tvb)-1, 1, '\0') == -1){ hash_info->state = WAIT_FOR_DATA; } if(hash_info->state == WAIT_FOR_STDERR_PORT - && tvb_length_remaining(tvb, offset)){ + && tvb_reported_length_remaining(tvb, offset)){ field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII); /* Check if this looks like the stderr_port field. @@ -256,7 +256,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_CLIENT_USERNAME - && tvb_length_remaining(tvb, offset)){ + && tvb_reported_length_remaining(tvb, offset)){ field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII); /* Check if this looks like the username field */ @@ -284,7 +284,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_SERVER_USERNAME - && tvb_length_remaining(tvb, offset)){ + && tvb_reported_length_remaining(tvb, offset)){ field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII); /* Check if this looks like the password field */ @@ -314,7 +314,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_COMMAND - && tvb_length_remaining(tvb, offset)){ + && tvb_reported_length_remaining(tvb, offset)){ field_stringz = tvb_get_stringz_enc(wmem_packet_scope(), tvb, offset, &length, ENC_ASCII); /* Check if this looks like the command field */ @@ -337,7 +337,7 @@ dissect_rsh(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_DATA - && tvb_length_remaining(tvb, offset)){ + && tvb_reported_length_remaining(tvb, offset)){ if(pinfo->destport == RSH_PORT){ /* Packet going to the server */ /* offset = 0 since the whole packet is data */ |