aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbuff_subset.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/tvbuff_subset.c')
-rw-r--r--epan/tvbuff_subset.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/tvbuff_subset.c b/epan/tvbuff_subset.c
index cfcfbdec60..518d573bc5 100644
--- a/epan/tvbuff_subset.c
+++ b/epan/tvbuff_subset.c
@@ -155,7 +155,7 @@ tvb_new_subset_length_caplen(tvbuff_t *backing, const gint backing_offset, const
}
tvbuff_t *
-tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint backing_length)
+tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint reported_length)
{
gint captured_length;
tvbuff_t *tvb;
@@ -164,21 +164,21 @@ tvb_new_subset_length(tvbuff_t *backing, const gint backing_offset, const gint b
DISSECTOR_ASSERT(backing && backing->initialized);
- THROW_ON(backing_length < 0, ReportedBoundsError);
+ THROW_ON(reported_length < 0, ReportedBoundsError);
/*
* Give the next dissector only captured_length bytes.
*/
captured_length = tvb_captured_length_remaining(backing, backing_offset);
THROW_ON(captured_length < 0, BoundsError);
- if (captured_length > backing_length)
- captured_length = backing_length;
+ if (captured_length > reported_length)
+ captured_length = reported_length;
tvb_check_offset_length(backing, backing_offset, captured_length,
&subset_tvb_offset,
&subset_tvb_length);
- tvb = tvb_new_with_subset(backing, backing_length,
+ tvb = tvb_new_with_subset(backing, reported_length,
subset_tvb_offset, subset_tvb_length);
tvb_add_to_chain(backing, tvb);