diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:59 +0000 |
commit | 982fc7184d46621948e53b485c7504c9d11f3350 (patch) | |
tree | ca218a5ad0f5395fd3f39a22754b767c04265711 /editcap.c | |
parent | Releasing progress-linux version 4.2.4-1~progress7.99u1. (diff) | |
download | wireshark-982fc7184d46621948e53b485c7504c9d11f3350.tar.xz wireshark-982fc7184d46621948e53b485c7504c9d11f3350.zip |
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'editcap.c')
-rw-r--r-- | editcap.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1943,6 +1943,10 @@ main(int argc, char *argv[]) } while (nstime_cmp(&rec->ts, &block_next) > 0) { /* time for the next file */ + /* We presumably want to write the DSBs from files given + * on the command line to every file. + */ + wtap_block_array_ref(params.dsbs_initial); if (!wtap_dump_close(pdh, NULL, &write_err, &write_err_info)) { cfile_close_failure_message(filename, write_err, write_err_info); @@ -1978,6 +1982,11 @@ main(int argc, char *argv[]) if (split_packet_count != 0) { /* time for the next file? */ if (written_count > 0 && (written_count % split_packet_count) == 0) { + + /* We presumably want to write the DSBs from files given + * on the command line to every file. + */ + wtap_block_array_ref(params.dsbs_initial); if (!wtap_dump_close(pdh, NULL, &write_err, &write_err_info)) { cfile_close_failure_message(filename, write_err, write_err_info); @@ -2594,7 +2603,7 @@ handle_chopping(chop_t chop, wtap_packet_header *out_phdr, if (chop.off_begin_pos > 0) { memmove(*buf + chop.off_begin_pos, *buf + chop.off_begin_pos + chop.len_begin, - out_phdr->caplen - chop.len_begin); + out_phdr->caplen - (chop.off_begin_pos + chop.len_begin)); } else { *buf += chop.len_begin; } |