aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorMichael Tuexen <tuexen@wireshark.org>2021-11-19 23:38:52 +0100
committerMichael Tuexen <tuexen@wireshark.org>2021-11-20 00:10:28 +0100
commit2b52d14d6233d70dfd4cd03d25faa3b536e3cbcf (patch)
tree411df3f46686d5c78131c04de6e70fa9c7711011 /wiretap
parent389cf9d752a799b48e889502734192a2b1daefee (diff)
BBLog: Fix the handling of skipped blocks
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pcapng.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/wiretap/pcapng.c b/wiretap/pcapng.c
index e751366b9f..6e4004c22b 100644
--- a/wiretap/pcapng.c
+++ b/wiretap/pcapng.c
@@ -2709,13 +2709,16 @@ pcapng_read_nflx_custom_block(FILE_T fh, pcapng_block_header_t *bh,
MIN_NFLX_CB_SIZE + (guint32)sizeof(guint32));
return FALSE;
}
- wblock->rec->rec_header.custom_block_header.custom_data_header.nflx_custom_data_header.type = BBLOG_TYPE_SKIPPED_BLOCK;
- opt_cont_buf_len = bh->block_total_length - MIN_NFLX_CB_SIZE - sizeof(guint32);
if (!wtap_read_bytes(fh, &skipped, sizeof(guint32), err, err_info)) {
ws_debug("Failed to read skipped");
return FALSE;
}
+ wblock->rec->presence_flags = 0;
+ wblock->rec->rec_header.custom_block_header.length = 4;
+ wblock->rec->rec_header.custom_block_header.custom_data_header.nflx_custom_data_header.type = BBLOG_TYPE_SKIPPED_BLOCK;
wblock->rec->rec_header.custom_block_header.custom_data_header.nflx_custom_data_header.skipped = GUINT32_FROM_LE(skipped);
+ wblock->internal = FALSE;
+ opt_cont_buf_len = bh->block_total_length - MIN_NFLX_CB_SIZE - sizeof(guint32);
ws_debug("skipped: %u", wblock->rec->rec_header.custom_block_header.custom_data_header.nflx_custom_data_header.skipped);
break;
default: