diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-22 20:53:46 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 03:54:13 +0000 |
commit | 6fd7e5ba33dd9104803173086c1e79c42c2e3754 (patch) | |
tree | eb0e9e98d6dda61eeaa83457a606e772543a940d /epan/dissectors/packet-exec.c | |
parent | 46e5fd833eb3e38cab9a10e5d93ce538558196d0 (diff) |
Remove more deprecated tvb_length calls
Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f
Reviewed-on: https://code.wireshark.org/review/9050
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-exec.c')
-rw-r--r-- | epan/dissectors/packet-exec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-exec.c b/epan/dissectors/packet-exec.c index 6f6f81d45d..273cc0d31c 100644 --- a/epan/dissectors/packet-exec.c +++ b/epan/dissectors/packet-exec.c @@ -217,12 +217,12 @@ dissect_exec(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. @@ -245,7 +245,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_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 */ @@ -273,7 +273,7 @@ dissect_exec(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if(hash_info->state == WAIT_FOR_PASSWORD - && 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 */ @@ -296,7 +296,7 @@ dissect_exec(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 */ @@ -319,7 +319,7 @@ dissect_exec(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 == EXEC_PORT){ /* Packet going to the server */ /* offset = 0 since the whole packet is data */ |