aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff_subset.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-07-14 22:38:03 +0000
committerGuy Harris <guy@alum.mit.edu>2013-07-14 22:38:03 +0000
commitd296ebc5254f78f5c18cd066fc886002b900a0a8 (patch)
tree3012c7f5dbcbfa7235cfc510deb9705cad1f410f /epan/tvbuff_subset.c
parentb68e6dcc429d9dc8e0996c98c1e7ab3e38d75144 (diff)
All routines taking an offset and length that want to access the data in
the backing tvbuff must add the subset tvbuff's offset to the offset argument, to skip to the subset. svn path=/trunk/; revision=50591
Diffstat (limited to 'epan/tvbuff_subset.c')
-rw-r--r--epan/tvbuff_subset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/tvbuff_subset.c b/epan/tvbuff_subset.c
index c37b63b0c2..77f48e19c6 100644
--- a/epan/tvbuff_subset.c
+++ b/epan/tvbuff_subset.c
@@ -98,7 +98,7 @@ subset_clone(tvbuff_t *tvb, guint abs_offset, guint abs_length)
{
struct tvb_subset *subset_tvb = (struct tvb_subset *) tvb;
- return tvb_clone_offset_len(subset_tvb->subset.tvb, abs_offset, abs_length);
+ return tvb_clone_offset_len(subset_tvb->subset.tvb, subset_tvb->subset.offset + abs_offset, abs_length);
}
static const struct tvb_ops tvb_subset_ops = {