file-pcapng: correctly check whether there are any options in the block.

Check whether the length of data remaining in the block content,
starting at the offset past the data preceding options, is > 0, don't
check whether the *total* block content length is > 0.
This commit is contained in:
Guy Harris 2021-06-12 15:58:56 -07:00
parent 14b695d9b3
commit 76174b19b0
1 changed files with 1 additions and 1 deletions

View File

@ -655,7 +655,7 @@ static gint dissect_options(proto_tree *tree, packet_info *pinfo,
guint64 value_u64;
e_guid_t uuid;
if (tvb_reported_length(tvb) <= 0)
if (tvb_reported_length_remaining(tvb, offset) <= 0)
return 0;
options_item = proto_tree_add_item(tree, hf_pcapng_options, tvb, offset, -1, ENC_NA);