diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-17 15:00:52 +0000 |
commit | 0f157e7d6c4be48f213ea022cb2d6d1316c423c8 (patch) | |
tree | ff4ad271b50a39e23d5a50a54f4bff37342cdc1c /editcap.c | |
parent | Adding debian version 4.2.4-1. (diff) | |
download | wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.tar.xz wireshark-0f157e7d6c4be48f213ea022cb2d6d1316c423c8.zip |
Merging upstream version 4.2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-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; } |