wiretap: Fix an underflow in pcapng.

Make sure account for our rounded option length when we process
opt_endofopt. Fixes #17755.
This commit is contained in:
Gerald Combs 2021-12-01 09:16:45 -08:00 committed by Guy Harris
parent cf0ecc4fe1
commit fcf945f747
1 changed files with 1 additions and 1 deletions

View File

@ -987,7 +987,7 @@ pcapng_process_options(FILE_T fh, wtapng_block_t *wblock,
ws_debug("%u bytes after opt_endofopt", opt_bytes_remaining);
}
/* padding should be ok here, just get out of this */
opt_bytes_remaining = 0;
opt_bytes_remaining = rounded_option_length;
break;
case(OPT_COMMENT):
pcapng_process_string_option(wblock, option_code, option_length,