summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2014-03-26 12:14:59 +0100
committerMartin Kaiser <wireshark@kaiser.cx>2014-03-26 22:16:03 +0000
commit436100c66a496fe7bc7a9dd0ac41c244bc7dc52d (patch)
tree48c317a15b9fc069b09a67fcd3d79dcc30b60f3a
parent482a3cd1f1c533f470c6cc2c9a63ddb7bf56e3b3 (diff)
downloadwireshark-436100c66a496fe7bc7a9dd0ac41c244bc7dc52d.tar.gz
use the correct png chunk len
the parameter for proto_tree_add_text() is the length, not the end offset Change-Id: Ie24d5982b7ff13363061fb087438dd714cae748a Reviewed-on: https://code.wireshark.org/review/837 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
-rw-r--r--epan/dissectors/file-png.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/file-png.c b/epan/dissectors/file-png.c
index b47a6c8478..9438b844e2 100644
--- a/epan/dissectors/file-png.c
+++ b/epan/dissectors/file-png.c
@@ -343,7 +343,7 @@ dissect_png(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *da
str[3]=tvb_get_guint8(tvb, offset+7);
str[4]=0;
- it=proto_tree_add_text(tree, tvb, offset, offset+8+len+4, "%s", str);
+ it=proto_tree_add_text(tree, tvb, offset, 4+4+len+4, "%s", str);
chunk_tree=proto_item_add_subtree(it, ett_png_chunk);
proto_tree_add_item(chunk_tree, &hfi_png_chunk_len, tvb, offset, 4, ENC_BIG_ENDIAN);