Commit Graph

82754 Commits

Author SHA1 Message Date
João Valverde b8f9758742 MSYS2: Use system SpeexDSP package 2021-11-12 11:19:34 +00:00
Guy Harris c3599a9616 "register_dissector()" isn't just to let you write a Lua chained dissector.
It's to let other dissectors find the dissector being registered, so
that they can call it, for whatever reason.
2021-11-11 22:41:20 -08:00
Gerald Combs 3f8f22f472 Qt: Add some notes about cleaning up after ourselves. 2021-11-11 13:21:48 -08:00
Robert Shade 1f20b1cead RTPS: Fix the field name used for timestamp 2021-11-11 17:37:51 +00:00
Robert Shade f277ef5e27 RTPS: Enable dissection of PLAIN_CDR2 2021-11-11 17:16:47 +00:00
Stefan Battmer 599d3e2c94 gvsp: Added dissector support for various 'reserved' bytes
- Added dissector support for the various reserved fields of the container
- Adjusted some of the display strings
2021-11-11 17:02:14 +00:00
PaulTyler 6be988d9b2 RTPS: Fix Group GUID dissector bug.
Dissector was not correctly distinguishing between 12 byte and 16 byte Group GUIDs.
Code for dissecting Participant GUID used as guidance.
closes #17631.
2021-11-11 16:47:42 +00:00
Zoran Bošnjak adf48851b1 asterix: Sync with asterix-specs #dc8e48b56c 2021-11-11 13:47:10 +00:00
João Valverde a37295204f rawshark: Move a comment to the proper place 2021-11-11 09:51:52 +00:00
João Valverde 526ccff3d0 ftypes: Remove unused function declarations
Some registration function declarations were left behind,
remove them. While here move function declarations after
typedefs as is customary.
2021-11-11 09:50:29 +00:00
João Valverde fd78f1ed02 ftypes: Clean up duplicate struct field 2021-11-11 09:50:12 +00:00
João Valverde 5503d5e131 ftypes: Optimize a memory allocation
Avoid pre-allocating a large worst case size character buffer.
2021-11-11 03:56:04 +00:00
João Valverde 1a32a75a62 ftypes: Internal headers need to be internal
The header ftypes-int.h should not be used outside of epan/ftypes
because it is a private header.

The functions fvalue_free() and fvalue_cleanup() need not and should
not be macros either.
2021-11-11 03:15:31 +00:00
Gerald Combs 37f1cf1a92 Tools: Let jq escape backslashes in gen-bugnote. 2021-11-11 02:41:32 +00:00
Gerald Combs 9f46ae74ff SHICP: Provide a valid string length.
Fixes #17723.
2021-11-10 18:27:34 -08:00
Gerald Combs 87b84b7813 Lua is a proper name. Fix its capitalization. 2021-11-11 01:08:51 +00:00
John Thacker 139c04f40a DLEP: Desegment messages over TCP
Handle multiple message PDUs in a single TCP segment, and DLEP messages
split across multiple segments. Fix #17669.
2021-11-11 00:13:23 +00:00
Роман Донченко 4c75a78f26 Refactor generate_authors.pl to remove the text duplicated from AUTHORS.src
Now the script just copies the corresponding sections from AUTHORS.src.
2021-11-10 23:59:21 +00:00
Роман Донченко 614c64b3b5 Synchronize the acknowledgements between AUTHORS.src and generate_authors.pl
Note that the Henrik Brix Andersen and Christophe Devine acknowledgements
were deliberately removed in 272becd8.
2021-11-10 23:59:21 +00:00
Роман Донченко b95be90d27 tools/generate_authors.pl: simplify repeated I/O code
By using the `open` pragma and `say` function, we can get Perl to do the
encoding, decoding and line termination for us.
2021-11-10 23:59:20 +00:00
Gerald Combs eda588d1a6 Revert "Qt: fix memory leaks found by Visual Leak Detector"
This reverts commit c2edb44a9a.

While we should definitely avoid leaking memory, this runs up against
the Qt code's assumption that it will always have valid epan data.

Fixes #17590.
Fixes #17719.
2021-11-10 11:48:26 -08:00
Gerald Combs 7a30021aef Revert "Qt: Fix epan cleanup exit crash"
This reverts commit 5f50fad289.
2021-11-10 11:48:09 -08:00
João Valverde 6f1b814e25 Fix some narrowing compiler warnings
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(448,47): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(448,47): warning C4267:          guint32_to_str_buf(fv->value.uinteger, buf, size); [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(448,47): warning C4267:                                                      ^ [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(793,31): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(793,31): warning C4267:  guint64_to_str_buf(val, buf, size); [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\epan\ftypes\ftype-integer.c(793,31): warning C4267:                               ^ [C:\Development\wsbuild-msvc\epan\ftypes\ftypes.vcxproj]
C:\Development\wireshark\wireshark\rawshark.c(1140,24): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data [C:\Development\wsbuild-msvc\rawshark.vcxproj]
C:\Development\wireshark\wireshark\rawshark.c(1140,24): warning C4267:         fs_len = strlen(fs_buf); [C:\Development\wsbuild-msvc\rawshark.vcxproj]
C:\Development\wireshark\wireshark\rawshark.c(1140,24): warning C4267:                        ^ [C:\Development\wsbuild-msvc\rawshark.vcxproj]
2021-11-10 16:13:17 +00:00
João Valverde 6ad14ac4fa ftypes: Remove fvalue_string_repr_len()
The implementation is pre-computing the length and using that
to allocate a buffer. This doesn't have any practical advantage
and is inefficient because the code is mostly doing the same work
twice. Remove the unnecessary length pre-computation step.
2021-11-10 16:02:45 +00:00
João Valverde b49abcb215 epan: Remove fvalue_string_repr_len() from the public API
This function is unnecessary. Clients are receiving a wmem-allocated
buffer and have no need to know the length apriori.
2021-11-10 16:01:21 +00:00
João Valverde 084619088c ftypes: Bugfix missing return statement 2021-11-10 16:01:21 +00:00
João Valverde 4c800f2dba ftypes: Replace a g_snprintf() 2021-11-10 16:00:27 +00:00
João Valverde 7630577ffa ftypes: Bugfix a buffer size
The 'size' variable is not the size of the 'mantissa_str' buffer.
'size' is the output buffer size, sizeof(mantissa_str) is fixed
at 8 bytes.
2021-11-10 15:43:01 +00:00
Jaap Keuter 4010799cb3 TCP: always return a free-able string buffer
Closes #17722
2021-11-10 10:57:45 +00:00
Dr. Lars Völker 5b54bb2e0d MKA: MACsec SAK USE body length = 0 does not decode (BUGFIX) 2021-11-10 10:11:30 +00:00
frst 29d27153b2 FPP: Fix dissector preemption interface-id bug 2021-11-10 05:22:52 +00:00
John Thacker 41a6e505ee AVTP/IEEE1722: Fix offset when over UDP
Take into account the bytes for the sequence number when passing
the next tvb into the subdissectors. Fix #17389
2021-11-10 05:05:55 +00:00
João Valverde b62d4b8eca dfilter: Change string node display representation again
Adding double quotes to the display output format was probably a mistake.
2021-11-10 03:19:24 +00:00
João Valverde e7ecc9b9e5 dfilter: Clean up error format and exception code
Misc code cleanups. Add some extra stnode functions for increased type
safety. Fix a constness issue with df_lval_value().
2021-11-10 03:18:50 +00:00
João Valverde 63adcf7fb5 dfilter: Clean up function parameters semantic check 2021-11-10 02:12:06 +00:00
João Valverde d0a07881f4 dfilter: Remove unnecessary node conversion
This has never worked AFAICT because functions have never accepted
fvalues, only fields, so converting from unparsed to an fvalue
string is moot, they are both invalid argument types to functions.
2021-11-10 01:23:49 +00:00
João Valverde ac431ec855 dfilter: Remove some debug statements
Normalize the amount of debug code in the module.
2021-11-10 01:23:49 +00:00
João Valverde e965fa32a1 dfilter: Refactor some semantic check code
Try to reorganize the check_relation sub-functions for better
clarity and consistency and less duplication.
2021-11-10 01:23:29 +00:00
João Valverde cd7d06faaf dfilter: Add an assertion 2021-11-09 23:05:56 +00:00
Gerald Combs 1a1787d959 Epan: Reset our tap globals on cleanup.
Reset tap_listener_queue and tap_dissector_list in tap_cleanup() so that
other cleanup routines (e.g. tap dialog destructors) don't try to access
invalid memory. Fixes #17719.
2021-11-09 22:22:09 +00:00
João Valverde 237efe7b00 README.dissector: Reinforce a style recommendation. 2021-11-09 22:04:21 +00:00
João Valverde 5680d1ae0b wsutil: Improve bytes_to_str_max() API
Have these functions accept a zero max length to mean "display
the whole byte array". Change the max length parameter to receive a
number of bytes to print, not the length of the output character
string.

Adjust the macros bytes_to_str() and bytes_to_string_punct() to
produce the same output. Add more tests. Rename the functions to
bytes_to_str_maxlen() and bytes_to_str_punct_maxlen() because this is
an API break.
2021-11-09 20:57:05 +00:00
Filip Kågesson 82fd526e96 SHICP: Added dissector to support Secure Host IP Configuration Protocol.
A new dissector was added to support dissection of the SHICP protocol.
2021-11-09 19:49:58 +00:00
Gerald Combs 6ae87c7cf1 wslog: Add a NULL check.
Fixes Coverity CID 1485996.
2021-11-09 09:22:53 -08:00
Stig Bjørlykke f314b64fd0 Skinny: Fix arguments in parser
Remove a duplicated argument to fix a warning:

  Wrong number of arguments for string format.
  Format ptvcursor_add(cursor, hf_skinny_%s, 6, ENC_NA);
  takes 1, but 2 are provided.
2021-11-09 13:32:50 +00:00
Stig Bjørlykke ebb2df7a06 asn2wrs: Fix Type eth_type_default_body() arguments
Add tname as argument to Type eth_type_default_body() to fix a warning.

  Call to method Type.eth_type_default_body with too many arguments;
  should be no more than 1.
2021-11-09 13:17:39 +00:00
Tomasz Moń 5f50fad289 Qt: Fix epan cleanup exit crash
Do not keep epan_dissect_t instance hanging until FrameInformation
destructor is called. Simply copy the tvb data into local buffer and
cleanup epan_dissect_t instance as soon as possible.

Fixes #17590
2021-11-09 10:54:49 +00:00
Michael Tuexen d11c069786 BBLog: Fix support of TCP window scaling
Rcv.Wind.Shift and Snd.Wind.Shift were not displayed correctly by
the BBLog dissector and the TCP dissector was not using the
information about the shift values available in the BBLog file.
2021-11-08 23:05:20 +00:00
Gerald Combs e5eb17d414 UAT: Allow missing fields.
Add uat_set_default_values, which lets us provide default values for
fields that might be missing from the end of a UAT line. Set a default
value for the I/O Graph dialog's Y Axis Factor. Fixes the backward
compatibility issue described in #17623
2021-11-08 22:20:24 +00:00
Gerald Combs 846b17ee9a UAT: Allow extra fields.
If we encounter unexpected extra fields on a line, simply log a warning
and continue instead of returning an error. This allows forward
compatibility when we add a field to a UAT. We end up throwing away the
extra fields, but it's better than resetting the entire UAT. Fixes the
forward compatibility issue described in #17623.
2021-11-08 22:20:24 +00:00