Commit Graph

80863 Commits

Author SHA1 Message Date
Guy Harris 54508703b0 Plug a memory leak.
If the user aborted the process of exporting packets, if we're writing
to a temporary file, we unlink the file, but we don't free the
g_mallocated name of the file, so it's leaked.  Free it.
2021-05-22 12:23:50 -07:00
Guy Harris 10f36f219c oran: clean up write_pdu_label_and_info().
Declare it as being printflike, so that the compiler does
format-vs-argument-list checking.

Fix the error that found.

Make the string buffer into which it formats automatic, so that it's
thread-safe.
2021-05-22 11:45:10 -07:00
Guy Harris 66accecf3e dof: clean up adding the session key to the dissection.
Let the libwireshark code format the value of the session key, by
setting its display format to SEP_COLON.

Use proto_tree_add_bytes_with_length(), so that the session key becomes
the value of the field; otherwise, the length of the key isn't
specified.

This means we don't need to call bytestring_to_str() (the code in
epan/proto.c calls it for us).

This also plugs a leak of the string generated by bytestring_to_str().
2021-05-22 03:00:39 -07:00
Jirka Novak c01456b77e VoIP Dialogs: Refactoring of singleton windows to factory methods
Singletons moved from main_window to each class's static open<NameOfClass>
method:
- RtpPlayerDialog
- RtpStreamDialog
- VoipCallsDialog
- RtpAnalysisDialog

Fixed issue with selecting RTP stream in sequence dialog. When user
selected a stream and moved mouse to Rtp Player button and pressed it,
incorrect RTP stream was sent to it.
2021-05-22 03:08:46 +00:00
Guy Harris c22b857942 fuzzshark: close a leak.
If init_progfile_dir() fails, it returns a g_mallocated string with an
error message.  After printing the error message, free the string.
2021-05-21 19:40:00 -07:00
Guy Harris f0abd29e48 protobuf: close another leak.
Close the directory handle we've opened before returning a failure
indication if pbw_load_proto_file() or load_all_files_in_dir() reports a
failure.
2021-05-21 19:14:03 -07:00
Guy Harris f1ffe7d421 protobuf: close a leak when file loading fails.
Free the path we've constructed before returning a failure indication if
pbw_load_proto_file() or load_all_files_in_dir() reports a failure.

Also, explicitly compare pbw_load_proto_file()'s return value against 0,
to make it a little clearer that it's *not* a Boolean, it's a return
code (with 0 meaning success and different non-zero values meaning
failure; if it matters *which* failure it is, we should probably have
otherwise we should just make it a Boolean).
2021-05-21 18:33:56 -07:00
Guy Harris eb75366bc4 epan: redo the processing of ENC_APN_STR.
Process the characters entirely ourselves; that way, we don't have to
worry about tvb_get_string_enc(..., ENC_ASCII) mangling label length
values, can convert non-ASCII characters in labels to the Unicode
REPLACEMENT CHARACTER, and can do bounds checks.
2021-05-21 16:32:28 -07:00
Pascal Quantin 38bba32097 NAS 5GS: fix Non-3GPP NW policies IE dissection 2021-05-21 19:03:36 +02:00
Thomas Dreibholz f32cfe7ba3 Added documentation for new statistics. 2021-05-21 13:09:21 +00:00
Thomas Dreibholz 43d976abd9 Added statistics for ComponentStatusProtocol. 2021-05-21 13:09:21 +00:00
Thomas Dreibholz 1529b9199a Added statistics for FractalGeneratorProtocol. 2021-05-21 13:09:21 +00:00
Thomas Dreibholz cc8dd9b509 Added statistics for CalcAppProtocol. 2021-05-21 13:09:21 +00:00
Martin Mathieson 9f895960c1 ERLDP: Fix the type of the handshake tag.
Error: proto_tree_add_item_ret_uint(.., hf_erldp_tag, ...) called at epan/dissectors/packet-erldp.c:625 with type FT_STRING
    (allowed types are {'FT_UINT8', 'FT_CHAR', 'FT_UINT24', 'FT_UINT32', 'FT_UINT16'} )
2021-05-21 10:04:33 +00:00
Andreas Schultz 9b35d47758 ErlDP: decode handshake flags 2021-05-21 09:48:43 +00:00
Anders Broman 9456a85022 NSIS: install all files in the protobuff directory. 2021-05-21 10:38:54 +02:00
John Thacker 3b71af71e1 DVB-S2-BB: Make dissect_dvb_s2_bb() have the dissector_t signature
Change dissect_dvb_s2_bb to take a tvb_subset instead of being
passed in an offset. Rearrange the parameters so that it has the
dissector_t signature. This is a little cleaner, and also allows
in the future creating dissector handles that point directly to
baseband frames (if we know we have L.1/ out of band mode adaptation.)
2021-05-20 21:39:45 -04:00
Thomas Dreibholz dab7c74268 Reduced size of the ASAP and ENRP Statistics screenshots.
PNGs were compressed by using "pngquant --speed 1 ...".
2021-05-20 21:03:12 +00:00
Thomas Dreibholz 031d2e8a48 Updated documentation of the RSerPool statistics. 2021-05-20 21:03:12 +00:00
Thomas Dreibholz 9d5633e215 Added bytes and byte rate to ASAP and ENRP statistics. 2021-05-20 21:03:12 +00:00
Anders Broman f5c05eedc5 Adding more than one protobuff file fails. 2021-05-20 18:37:51 +00:00
Pascal Quantin 7816d49bb4 NGAP: fix dissection of UERadioCapability IE for NB-IoT UEs 2021-05-20 18:45:39 +02:00
Anders Broman 31ca47eafc Use ENC_APN_STR in one more place. 2021-05-20 12:21:06 +00:00
Martin Mathieson f54221b579 DCT2000: allow for longer lines/PDUs 2021-05-20 12:05:23 +00:00
Piotr Winiarczyk f7c6d2e9e5 btmesh: Add dissectors of some generic opcodes
Add dissectors of some opcodes from Mesh Models document. Closes #17402
2021-05-20 11:08:43 +00:00
AndersBroman 754cce9531 Add ENC_APN_STR to handle APN strings 2021-05-20 09:27:53 +00:00
Alexis La Goutte 34ae07e180 ieee80211: reorder some ett rnr field 2021-05-20 04:01:33 +00:00
Alexis La Goutte 4228201eaa ieee80211: Enhance display when there is multiple TBTT Information 2021-05-20 04:01:33 +00:00
Alexis La Goutte 6d29f28557 ieee80211: Fix Multiple Neigbor AP Information on RNR 2021-05-20 04:01:33 +00:00
João Valverde cee1b443b5 wsutil: Add ws_assert_bounds() 2021-05-20 03:01:05 +01:00
João Valverde adfb0b99c2 wsutil: Avoid using g_abort()
g_abort() requires GLib 2.50, our minimum required version
is 2.38.
2021-05-20 03:01:05 +01:00
João Valverde cf0cb5819f Fixup ws_assert() macro
Use a void expression instead of removing the expression
entirely. Under certain conditions, for example as the only
statement in an if() conditional, removing the assertion
will generate compiler warnings.
2021-05-20 03:01:05 +01:00
João Valverde 01144f9109 Fix a maybe-uninitialized warning with -O3 (gcc)
GCC 11.1.0.

./epan/dissectors/packet-dcerpc-netlogon.c: In function ‘dissect_secchan_verf’:
../epan/dissectors/packet-dcerpc-netlogon.c:8162:13: error: ‘digest’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
 8162 |     guint64 digest;
      |             ^~~~~~
2021-05-20 03:00:21 +01:00
David Perry 32cc1c7906 Remove use of PACKAGE_VERSION in maxminddb version 2021-05-19 17:16:01 +00:00
David Perry a1ba9453ef Add version info for lz4, zstd, maxmind
This simply implements the patches given in a comment on bug 16270.
<https://gitlab.com/wireshark/wireshark/-/issues/16270#note_400748726>
2021-05-19 13:38:25 +00:00
Dirk Römmen a1a2b53663 BACnet: BACnet revision 22 secure connect datalink implementation.
- Implements the BACnet /SC datalink using encrypted TLS communication
over TCP/IP and the websocket protocol.
- Updated list of vendor ID's
- Added new BACnet services Who-Am-I / You-Are
- Some corrections for revision 22.
- Fixed bug issue #17142
2021-05-19 13:21:48 +00:00
Michał Kaźmierowski df508537be OER: check unused bit count while parsing bit string 2021-05-19 12:28:07 +02:00
João Valverde e10f761362 wslua: Replace g_assert() with ws_assert() 2021-05-19 03:52:45 +01:00
João Valverde 1fe4638648 wmem: Replace g_assert() with ws_assert() 2021-05-19 03:52:45 +01:00
João Valverde 8eacd615c8 Disable assertions for release builds
Currently our build generates very many warnings if
G_DISABLE_ASSERT is defined.

Add ws_assert() and ws_assert_not_reached() to incrementally
replace existing assertions and then disable them using
WS_DISABLE_ASSERT.

Assertions are disabled with CMake build type Release.
By default the build type is RelWithDebInfo so the current
behaviour of enabling assertions by default is (for now) preserved.

Add some notes to README.Developer.
2021-05-19 03:52:45 +01:00
Anders Broman 1ad447aab9 NRPPA: Update to 3GPP TS 38.455 V16.3.0 (2021-04) 2021-05-18 10:11:30 +00:00
Christian Fischer dd7639f64c packet-cip.c: Remove superfluous space in vendor name of cip_vendor_vals 2021-05-18 08:56:20 +00:00
Guy Harris 6e95a0aa47 PortsModel: don't populate it by doing a lot of weird string-pushing.
When enumerating port-to-name entries, the callback to
wmem_map_foreach() gets passed:

- a key, which is the port number for the entry;
- a value, which is a pointer to a structure containing pointers to port
names for various transport protocols;
- a user data pointer.

That's sufficient (if you work around some C++ annoyances) to append a
row to a PortsModel, if the user data pointer is a pointer to the
PortsModel.

The existing code, instead, appended to a QStringList of lines (in
effect, undoing the effort of the code that read the services file and
filled in the wmem_map, re-generating a set of lines) in the callback,
and then iterated over all the lines, splitting them with blanks and
appending rows.

Looking at that made my eyeballs bleed so badly that I decided not to
spend any time figuring out why it wasn't working.

So I just make the callback just append rows, avoiding all the
string-pushing.

Fixes #17395.
2021-05-18 01:03:04 -07:00
Nardi Ivan 389a899a18 QUIC: improve handling of unencrypted padding data
0af60377b4 added an heuristic to detect (unencrypted) padding data;
it is based on the fact that all coalesced QUIC packets must have the
same CID.
Unfortunately it doesn't work when the CID length is 0.

Treat decryption error of SH packets as a non fatal error, report them
as possible padding data misdetectd as coalesced packets and try
decrypting next traffic.

Close #17383
2021-05-17 20:10:59 +02:00
Dario Lombardo 5eb6b85a7a sparkplug: fix crash.
The crash occurs when we don't have enough data to perform a string
comparison. Fix by first check it.
2021-05-17 16:05:00 +00:00
Dario Lombardo 8f8453bb12 spakplug: fix leak. 2021-05-17 16:05:00 +00:00
Anders Broman dda4a4f4c8 LCS-AP: Update to V16.2.0 (2020-12) - no code change 2021-05-17 15:49:22 +00:00
Dario Lombardo 9d3069fe7d
http: fix compilation without zlib and brotli. 2021-05-17 10:06:08 +02:00
John Thacker 157222a031 NGAP, XNaP, NAS_5GS: Add E212_GUAMI to MCC/MNC field choices 2021-05-16 19:39:15 -04:00
Pascal Quantin 1767788e3c NAS EPS: use newly introduced E212_GUMMEI 2021-05-16 23:24:02 +02:00