From 11803d422f31038bb03c068c2daddf29dba36603 Mon Sep 17 00:00:00 2001 From: Evan Huus Date: Mon, 22 Jun 2015 14:40:23 -0700 Subject: Remove more tvb_length Change-Id: I940704e927001b2a051a59fd0738e7a02328472b Reviewed-on: https://code.wireshark.org/review/9031 Reviewed-by: Evan Huus --- epan/dissectors/file-png.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/file-png.c') 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); } -- cgit v1.2.3