forked from osmocom/wireshark
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:
parent
cf0ecc4fe1
commit
fcf945f747
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue