Commit Graph

80880 Commits

Author SHA1 Message Date
João Valverde 9ba97d12d6 Add ws_debug() and use it
Replace most instances of ws_debug_printf() except in
epan/dissectors and dissector plugins.

Some replacements use printf(), some use ws_debug(), and
some were removed because they were dead or judged to be
temporary.
2021-05-24 01:13:19 +00:00
João Valverde de00cdd512 pcapng: Fix debug statements 2021-05-24 01:13:19 +00:00
Guy Harris 976ccc9a00 netscaler: plug a memory leak.
Free the read buffer if the first read fails.
2021-05-23 17:56:18 -07:00
Guy Harris 1bb64b7e0c tacacs: free a buffer if it's not used.
Plugs a leak.
2021-05-23 17:04:59 -07:00
Guy Harris 618661b22e dnp: plug a memory leak.
If we're throwing away the data, *throw away the data* - free it, as
we're not using it as the backing data for a tvbuff.
2021-05-23 21:28:58 +00:00
Martin Tschoepe d9a93acc93 PROFInet: Correct handling for multiple APIs
When dissecting messages with multiple API types
within the same message, the parsing of the connect
request fails to take all elements into account.
This results in only partial parsing of the elements.

This fix ensures that all parts of the message are taken
into account and dissected correctly.
2021-05-23 20:47:50 +00:00
Chris Brandson 764d3d1be0 change info labels to match Zigbee spec for clarity 2021-05-23 19:22:15 +00:00
Alexis La Goutte 00c4056670 nvme: Fix Dead Store
Value stored to 'bytes' is never read
2021-05-23 19:06:48 +00:00
Chuck Craft 30832dcdea addr_resolv: repopulate services table on profile switch 2021-05-23 18:50:25 +00:00
John Thacker 6b2dd3561e DVB-S2-BB: Make dissect_dvb_s2_gse() have the dissector_t signature
Change dissect_dvb_s2_bb to take a tvb_subset of the appropriate size
and offset instead of being passed in an offset and length. 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
call the GSE dissector directly for GSE frames not carried within a
BBFrame.
2021-05-23 18:34:36 +00:00
Gerald Combs 479c8a29eb [Automatic update for 2021-05-23]
Update manuf, services enterprise numbers, translations, and other items.
2021-05-23 16:04:46 +00:00
Constantine Gavrilov 81511a5f98 NVMe: fix parsing ANA Get LogPage response. 2021-05-23 16:29:59 +03:00
Guy Harris c73ab16bef OID handling: fix a memory leak.
There's a "break" in some code that appears to be copied and pasted from
a switch statement; the break would exit the loop (and leak memory
allocated within the loop), which does not appear to be the intent, so
it may have been copied over incorrectly.  Remove it.

While we're at it, redo the "constant-time append to the end of a loop"
code to be a bit clearer, both to humans reading the code and code
analyzers reading the code.
2021-05-23 01:27:11 -07:00
Guy Harris 64f3f08702 epl-profile-parser: plug a memory leak.
g_key_file_get_groups() returns a pointer to g_mallocated data; we need
to pass its return value to g_strfreev() when we're done with that data,
to free it up.
2021-05-23 00:03:01 -07:00
Guy Harris 7aa828a986 RTP streams: plug memory leaks.
Don't allocate the rtpstream_id_t's until we know we have enough
information to fill them in and use them.

Keep trace of whether we have used them and, if not, free them.
2021-05-22 23:03:17 -07:00
Guy Harris 8ca86b29bf Plug another leak.
If cf_export_specified_packets() succeeds, and it wrote to a temporary
file, it leaks the name of the file to which it was writing.  Free that
after we've renamed that file on top of the target file (safe save).
2021-05-22 19:01:22 -07:00
Guy Harris 1502615794 Remove a duplicate unlink.
In cf_export_specified_packets(), if the loop processing the packets
fails, we're going to go to the failure code, which will unlink the file
to which we were writing if we were writing to a temporary file, so we
don't need to unlink it before going there.

While we're at it, note why we don't report any error from
wtap_dump_close() in that case.
2021-05-22 13:27:57 -07:00
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