diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:15:59 +0000 |
commit | 489b73a4c69e01167e693d7153f973105c613c30 (patch) | |
tree | 5d72d5ab3cf7dd8efa4e1733579d216d79c8ad66 /wiretap | |
parent | Releasing progress-linux version 4.2.5-2~progress7.99u1. (diff) | |
download | wireshark-489b73a4c69e01167e693d7153f973105c613c30.tar.xz wireshark-489b73a4c69e01167e693d7153f973105c613c30.zip |
Merging upstream version 4.2.6.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'wiretap')
-rw-r--r-- | wiretap/CMakeLists.txt | 2 | ||||
-rw-r--r-- | wiretap/log3gpp.c | 6 | ||||
-rw-r--r-- | wiretap/merge.c | 16 |
3 files changed, 21 insertions, 3 deletions
diff --git a/wiretap/CMakeLists.txt b/wiretap/CMakeLists.txt index fe5ef693..90c6ce12 100644 --- a/wiretap/CMakeLists.txt +++ b/wiretap/CMakeLists.txt @@ -175,7 +175,7 @@ set_target_properties(wiretap PROPERTIES PREFIX "lib" COMPILE_DEFINITIONS "WS_BUILD_DLL" LINK_FLAGS "${WS_LINK_FLAGS}" - VERSION "14.1.5" SOVERSION 14 + VERSION "14.1.6" SOVERSION 14 FOLDER "DLLs" INSTALL_RPATH "${LIBRARY_INSTALL_RPATH}" ) diff --git a/wiretap/log3gpp.c b/wiretap/log3gpp.c index 4754d6c2..6fb21f6f 100644 --- a/wiretap/log3gpp.c +++ b/wiretap/log3gpp.c @@ -503,7 +503,7 @@ gboolean parse_line(gchar* linebuff, gint line_length, gint *seconds, gint *usec int prot_option_chars = 0; char seconds_buff[MAX_SECONDS_CHARS+1]; int seconds_chars; - char subsecond_decimals_buff[MAX_SUBSECOND_DECIMALS+1]; + char subsecond_decimals_buff[MAX_SUBSECOND_DECIMALS]; int subsecond_decimals_chars; /*********************************************************************/ @@ -574,7 +574,9 @@ gboolean parse_line(gchar* linebuff, gint line_length, gint *seconds, gint *usec } /* Convert found value into microseconds */ - subsecond_decimals_buff[subsecond_decimals_chars] = '\0'; + while (subsecond_decimals_chars < MAX_SUBSECOND_DECIMALS) { + subsecond_decimals_buff[subsecond_decimals_chars++] = '0'; + } /* Already know they are digits, so avoid expense of ws_strtoi32() */ *useconds = ((subsecond_decimals_buff[0] - '0') * 100000) + ((subsecond_decimals_buff[1] - '0') * 10000) + diff --git a/wiretap/merge.c b/wiretap/merge.c index 82154f9b..3c007dd6 100644 --- a/wiretap/merge.c +++ b/wiretap/merge.c @@ -1420,6 +1420,22 @@ merge_files(const gchar* out_filename, const int file_type, guint32 *err_framenum) { ws_assert(out_filename != NULL); + ws_assert(in_file_count > 0); + ws_assert(in_filenames != NULL); + ws_assert(err_info != NULL); + + /* #19402: ensure we aren't appending to one of our inputs */ + if (do_append) { + unsigned int i; + for (i = 0; i < in_file_count; i++) { + if (files_identical(out_filename, in_filenames[i])) { + *err_info = ws_strdup_printf("Output file %s is same as input file %s; " + "appending would create infinite loop", + out_filename, in_filenames[i]); + return MERGE_ERR_INVALID_OPTION; + } + } + } return merge_files_common(out_filename, NULL, NULL, file_type, in_filenames, in_file_count, |