diff options
Diffstat (limited to 'epan/proto.c')
-rw-r--r-- | epan/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/proto.c b/epan/proto.c index 07c8288f43..04eb5c3cf4 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -4504,7 +4504,7 @@ get_hfi_length(header_field_info *hfinfo, tvbuff_t *tvb, const gint start, gint * of the tvbuff: we throw an exception in that * case. */ - *length = tvb_ensure_captured_length_remaining(tvb, start); + *length = tvb_captured_length(tvb) ? tvb_ensure_captured_length_remaining(tvb, start) : 0; DISSECTOR_ASSERT(*length >= 0); break; |