diff options
author | Dario Lombardo <lomato@gmail.com> | 2014-06-17 17:45:00 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-06-18 14:14:58 +0000 |
commit | 246fe2ca4c67d8c98caa84e2f57694f6322e2f96 (patch) | |
tree | 5f8651517a3423cce11c50e18371d8a73c3c7665 /epan/dissectors/file-png.c | |
parent | 971ffd683ea23362bd8009567ff7860371e6e2cc (diff) |
Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/file-png.c')
-rw-r--r-- | epan/dissectors/file-png.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c index 4d19f19da8..0ba4fa22cc 100644 --- a/epan/dissectors/file-png.c +++ b/epan/dissectors/file-png.c @@ -326,7 +326,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 */ @@ -336,7 +336,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); } @@ -442,7 +442,7 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da /* http://libpng.org/pub/png/spec/1.2/PNG-Structure.html#PNG-file-signature */ static const guint8 magic[8] = { 137, 80, 78, 71, 13, 10, 26, 10 }; - if (tvb_length(tvb) < 20) + if (tvb_captured_length(tvb) < 20) return 0; if (tvb_memeql(tvb, 0, magic, sizeof(magic)) != 0) return 0; |