aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-09-16 14:30:16 -0700
committerGuy Harris <guy@alum.mit.edu>2014-09-16 21:30:47 +0000
commitb5296f465e805eb8529f5856641f3b03357e8367 (patch)
tree8f364e5d59244954ae9dbbef6101f4295d656a5e
parent1cbd9c795532468727fb8cff850a044ec64d925e (diff)
Use tvb_new_subset_length() rather than tvb_new_subset().
We rarely, if ever, want to, or need to, explicitly set the captured length of a packet; we want to set the *reported* length and let the tvbuff code figure out how much of that data was actually captured. Change-Id: I9b93d296197989f677d888b10954589dfc1edc59 Reviewed-on: https://code.wireshark.org/review/4138 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/proto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 06ffa93017..88c3e33f09 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -2403,7 +2403,7 @@ proto_tree_add_protocol_format(proto_tree *tree, int hfindex, tvbuff_t *tvb,
pi = proto_tree_add_pi(tree, hfinfo, tvb, start, &length);
- proto_tree_set_protocol_tvb(PNODE_FINFO(pi), (start == 0 ? tvb : tvb_new_subset(tvb, start, length, length)));
+ proto_tree_set_protocol_tvb(PNODE_FINFO(pi), (start == 0 ? tvb : tvb_new_subset_length(tvb, start, length)));
TRY_TO_FAKE_THIS_REPR(pi);