diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-22 14:40:23 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-22 21:40:50 +0000 |
commit | 11803d422f31038bb03c068c2daddf29dba36603 (patch) | |
tree | 77f13ff40c308d715a516d3aebab386423ed8d91 /epan/dissectors/file-png.c | |
parent | df352c535ff1f22cac89c06bc3dae669ff6853b9 (diff) |
Remove more tvb_length
Change-Id: I940704e927001b2a051a59fd0738e7a02328472b
Reviewed-on: https://code.wireshark.org/review/9031
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/file-png.c')
-rw-r--r-- | epan/dissectors/file-png.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c index 0ed86c73ff..496e6c67c1 100644 --- a/epan/dissectors/file-png.c +++ b/epan/dissectors/file-png.c @@ -324,7 +324,7 @@ dissect_png_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { gint offset=0, nul_offset; - nul_offset = tvb_find_guint8(tvb, offset, tvb_length_remaining(tvb, offset), 0); + nul_offset = tvb_find_guint8(tvb, offset, tvb_captured_length_remaining(tvb, offset), 0); /* nul_offset == 0 means empty keyword, this is not allowed by the png standard */ if (nul_offset<=0) { /* XXX exception */ @@ -334,7 +334,7 @@ dissect_png_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) proto_tree_add_item(tree, &hfi_png_text_keyword, tvb, offset, nul_offset, ENC_ISO_8859_1|ENC_NA); offset = nul_offset+1; /* length of the key word + 0 character */ - proto_tree_add_item(tree, &hfi_png_text_string, tvb, offset, tvb_length_remaining(tvb, offset), ENC_ISO_8859_1|ENC_NA); + proto_tree_add_item(tree, &hfi_png_text_string, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_ISO_8859_1|ENC_NA); } |