diff options
author | Michael Mann <mmann78@netscape.net> | 2014-06-19 17:18:16 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-06-19 18:25:59 +0000 |
commit | 14824e6adf07a1c3cfb6537ce8723d873ecd0d0f (patch) | |
tree | bdf1b52ecffe7825d719f34fb4be63c8a60bd1b4 /epan/dissectors/file-png.c | |
parent | 3557ac4ec688b86ec7819005a3a181600e056251 (diff) |
Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html
This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96.
Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
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 0ba4fa22cc..4d19f19da8 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_captured_length_remaining(tvb, offset), 0); + nul_offset = tvb_find_guint8(tvb, offset, tvb_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_captured_length_remaining(tvb, offset), ENC_ISO_8859_1|ENC_NA); + proto_tree_add_item(tree, &hfi_png_text_string, tvb, offset, tvb_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_captured_length(tvb) < 20) + if (tvb_length(tvb) < 20) return 0; if (tvb_memeql(tvb, 0, magic, sizeof(magic)) != 0) return 0; |