Commit Graph

77818 Commits

Author SHA1 Message Date
Matthew Weant 87f320ec25 IEEE802.11: HS2.0 ANQP Friendly Name Subtree Fix
Set index start to 1 for Friendly Operator Name subtree.
Moved lang code and name string within subtree.

Bug: 16534
Change-Id: I0fd4d926f585ec432a869c7a15e13b84d5d0f2fb
Reviewed-on: https://code.wireshark.org/review/36996
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 11:34:37 +00:00
Matthew Weant 9279be0394 IEEE802.11: Fixed HS2.0 Cap List Dissection
Adjusted dissect_anqp_capab_list() to include
~anqp_subtype and ~anqp_reserved fields when
WFA HS2.0 exists as a vendor-specific capability ID.

Bug: 16548
Change-Id: I2923df3f6de42a58af643cd07b29c77e802cdcab
Reviewed-on: https://code.wireshark.org/review/37147
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 11:33:42 +00:00
Peter Wu ef67994c90 TCP: Add expert info for SYN-ACK that accepts TFO data
"If the cookie is valid, the server sends a SYN-ACK acknowledging both
the SYN and the data." https://tools.ietf.org/html/rfc7413#page-6

Tested with tcp_tfo_session.pcapng from Bug 12838.

Bug: 16515
Change-Id: Idff67e9098d558ea60337b01e5c74514397a470f
Reviewed-on: https://code.wireshark.org/review/36994
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:54:03 +00:00
Dylan Ulis 3a82774b32 CIP: Various Updates
1. Electronic Key Segment: Add support for Serial Number Key Format
2. Electronic Key Segment: Display more values in generated (response) output
3. Display Route/Connection Path in response data
4. Add more device types, class names
5. Minor display improvements to text strings, units for clarity

Change-Id: Ie7738cb395579674db448535474444da49b5b297
Reviewed-on: https://code.wireshark.org/review/37156
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:53:00 +00:00
Peter Wu ceb45a186c QUIC: append Stream ID to more frame types
Show the Stream ID in the Info column after the RESET_STREAM,
STOP_SENDING, MAX_STREAM_DATA, and STREAM_DATA_BLOCKED frame types.

Change-Id: Icec0b35dcd0cd79d5be519505d7b3b98c0af9ca7
Ping-Bug: 13881
Reviewed-on: https://code.wireshark.org/review/37157
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-07 06:50:45 +00:00
Martin Kaiser 5d3eea14a3 ConversationDialog: fix a TCP graph race condition
When the user opens the conversation dialog, selects a tcp conversation and
presses the Graph button, the ConversationDialog kicks off these two actions

1.) apply a display filter "tcp.stream eq X" (where X is the number of the stream)
2.) open the tcp stream graph

Both actions are asynchronous and, at least on my machines, the graph is opened
before the filter is applied. The graph requires that the current packet be
part of the selected tcp conversation. If it's not (because the filter isn't
applied yet), we get the "Selected packet isn't a TCP segment or is truncated"
error message and the graph is not shown.

Fix this by enforcing the correct order for the two actions. MainWindow sends
the displayFilterSuccess signal when a display filter was applied. Listen to this
signal in ConversationDialog and launch the tcp graph when the filter was
applied successfully.

Change-Id: I63debe2125ba8f0a737ff4882a9fca0a7bcdb0f5
Reviewed-on: https://code.wireshark.org/review/37130
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 03:48:47 +00:00
Moshe Kaplan b869452ba3 packet-dof.c: Remove fprintf
d5fc969e57 removed
stdio.h's include. The missing stdio.h broke
the CentOS7 build. This commit removes calls to
fprintf to fix the CentOS7 build.

Change-Id: I3f93973ae6901a30414a75a8156967a0e470db90
Reviewed-on: https://code.wireshark.org/review/37137
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-07 03:47:02 +00:00
Martin Mathieson a5703f22cb More changes arising from PVS-Studio output.
/opt/SourceCode/wireshark/epan/dissectors/packet-ip.c	1556	err	V547 Expression 'opt == (1 | 0x00)' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-ipdc.c	739	warn	V547 Expression 'payload_len < 4' is always false.
/opt/SourceCode/wireshark/ui/text_import.c	1049	err	V547 Expression 'info->offset_type == OFFSET_DEC' is always true.

None of these are actual bugfixes.

Bug: 16335
Change-Id: I6d0d3bb92c70ea625fc8b559e7a2bc5ba4e29e25
Reviewed-on: https://code.wireshark.org/review/37136
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-06 08:35:11 +00:00
Tomasz Moń 1d0b233f12 Qt: Stretch last packet list header section
Programatically show the master split widget before elements are added
to prevent pending resize events from resizing packet columns to insane
widths (in my case orders of magnitude higher than display resolution)

Such resize was occuring when loading capture file if configuration file
included hidden columns (e.g. 55 defined columns, 8 visible). The resize
was not directly visible to user. Resize event call chain included calls
to recent_set_column_width() that changed width stored in configuration.
Modified configuration column width value would become effective after
user added or removed columns.

Hide PacketList when freezing and show it when thawing. Do not call
setUpdatesEnabled(false) as it leads to widget/preferences columns
missynchronization.

Clear packet list before freeing frame data. This prevents accessing
freed memory in ProtoTree on file close if packet list was in focus and
the next widget to get focus is packet details.

Ping-Bug: 16063
Bug: 16491
Change-Id: I2c21d928348681af1793b3263815c81ee73d41b0
Reviewed-on: https://code.wireshark.org/review/37029
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-06 03:50:18 +00:00
Jaap Keuter f399d135e0 IDL: Clean up IDL based dissector generation
Clean up the generators and generated dissectors a bit by updating
the header, removing unwanted includes and completing the modelines
block.

Change-Id: I8ff80b05bb598c3fa5a5f91a24d5caba87eb712e
Reviewed-on: https://code.wireshark.org/review/37154
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-06 03:49:52 +00:00
Jaap Keuter 5e4379f5b5 IDL: make code generation reproducible
The current state of generated code from the IDL specification is not
reproducible with the current omniidl backend. This change brings the
backend in line with the currently committed generated source code.

The exception to this is that the exceptions (no pun intended) were
collected in a dictionary of unspecified ordering, therefore inherently
non-reproducible. These thus differ from the previously committed source
code (packet-parlay.c), but do contain the same lines.

Also this rolls back commit 443df93896
because the committed generated source files were not created with the
backend with this change, nor do they fail to build, as claimed in that
commit.

Special thanks to Luke Mewburn for working on the dictionary problem.

Change-Id: I7707746d263c7556eb06883c877f70f0e9b357c5
Reviewed-on: https://code.wireshark.org/review/37153
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 20:12:29 +00:00
Matthew Weant ddc5a49ca4 EAP: AT_NOTIFICATION Dissection
Added two fields for EAP-SIM/AKA Notification Type.
Added value_string array for AT_NOTIFICATION types & external ref.
Updated else if statements to a switch for EAP-SIM and EAP-AKA
Updated eap_sim_aka_attribute_vals[] and added Client Error Codes

Bug: 16539
Change-Id: Iaf9949d713d700330536e805d9ceb9328d183744
Reviewed-on: https://code.wireshark.org/review/36999
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 20:09:48 +00:00
Pascal Quantin 5dabd51742 Windows: upgrade Npcap to 0.9991
Change-Id: I5c664a26ede1a5904d4f02a38c43af6c15dce5f9
Reviewed-on: https://code.wireshark.org/review/37152
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-05 19:35:29 +00:00
Martin Mathieson 1408dd3b50 Last batch of changes from PVS-Studio scan.
/opt/SourceCode/wireshark/epan/dissectors/packet-flip.c	155	warn	V547 Expression 'chksum_hdr_chksum == computed_chksum' is always false.
/opt/SourceCode/wireshark/epan/dissectors/packet-zbee-zcl-meas-sensing.c	1295	err	V590 Consider inspecting the '(value > 0x0000) || (value > 0xfffd)' expression. The expression is excessive or contains a misprint.
/opt/SourceCode/wireshark/ui/qt/lte_rlc_statistics_dialog.cpp	504	warn	V668 There is no sense in testing the 'channel_item' pointer against null, as the memory was allocated using the 'new' operator. The exception will be generated in the case of memory allocation error.

Bug: 16335
Change-Id: Ief19a82e84bd16df33c453d6cc30db37f1c589ea
Reviewed-on: https://code.wireshark.org/review/37150
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2020-05-05 18:41:30 +00:00
Dr. Lars Völker f263df0a45 SOMEIP: removing warnings due to guint64 (%lx vs %llx)
Change-Id: I5737c4ce48030a650f58df7593182563966c54a2
Reviewed-on: https://code.wireshark.org/review/37148
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-05 16:13:05 +00:00
Matthew Weant dba3081f4d EAP: Unknown Data at end of EAP Identities
Added unknown data field at end of EAP Identity
dissection to ensure clean offsets to CRC/Checksum.

Bug: 16529
Change-Id: I09bc945bb89a91231bb82ced011ca3d1075a7788
Reviewed-on: https://code.wireshark.org/review/37094
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 11:58:42 +00:00
Dr. Lars Völker 6ada4302b5 SOMEIP: Bugfix for SOME/IP-SD Collision of Unique ID
The unique id for SOME/IP-SD was not unique for eventgroups since
it was made up by the service id and instance id only.
This patch adds the eventgroup id to fix this.

Bug: 16549
Change-Id: I16bf0884d4a7bc1d3df5de868833fb1887ba0baa
Reviewed-on: https://code.wireshark.org/review/37131
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-05 06:25:51 +00:00
Guy Harris c5215707d4 Infiniband: skip past the undissected vendor header.
In parse_VENDOR() get the length of the raw data (presumed to be
vendor-specific data) by using proto_tree_add_item_ret_length(), and add
that to the offset.

Should addresses PVS-Studio complaint

/opt/SourceCode/wireshark/epan/dissectors/packet-infiniband.c	2782	warn
V1048 The '* offset' variable was assigned the same value.

Change-Id: Icac567e3ef2ad0484aaa111e5bc8a5cd83d9d8a5
Reviewed-on: https://code.wireshark.org/review/37143
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-05 05:18:10 +00:00
Guy Harris b99a0c95d8 pcapng (dissector): don't assume the endianness doesn't change.
Keep the endianness (as an ENC_ value) in the info structure we use
while dissecting.

When dissecting an SPB, peek ahead at the byte-order magic before
dissecting the block length, to determine the byte order of all fields
in that block *and* all other blocks in that section.  Report an error
and stop dissecting if the byte-order magic isn't valid.

Change-Id: I6d94d4fad10d60f327f4a486e180cdcee2f6be2d
Reviewed-on: https://code.wireshark.org/review/37138
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-05 01:34:24 +00:00
Guy Harris 432cb20707 Fix calculation of fractional part of time stamps.
Do it the same way that wiretap/pcapng.c does it.

Bug: 16440
Change-Id: Ied811e5d10d4219de718f4f74254440b324f0ed1
Reviewed-on: https://code.wireshark.org/review/37132
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-04 21:49:04 +00:00
Pascal Quantin 274ec6adc4 NAS 5GS: fix highlighting of the QOs flow description elements
Change-Id: I3907f0dd4c985d4a4390ad37454967350b7745eb
Reviewed-on: https://code.wireshark.org/review/37099
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-05-04 19:20:35 +00:00
David Perry 5b238a6c76 MIME/pcapng: use snap length to get SPB data length
The "Original Packet Length" field of a Simple Packet Block can be
greater than the amount of data actually captured; the Interface
Description Block's snap length must be checked as well.

To enable this in the MIME Files Format dissector, the
`interface_description` needs to store the snap length. This allows the
appropriate section of `dissect_block()` to access it via the `info`
parameter.

The "Captured Length" field from EPB/PB dissection is added to SPB
dissection as a generated field to clarify the difference between it and
the field labelled "Packet Length".

Bug: 16526
Change-Id: I27f2fccc9ed2f682377059931b18d7e42d7ff0a3
Reviewed-on: https://code.wireshark.org/review/37095
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-04 18:53:36 +00:00
Indraneel Guha 5634eb64b6 LBMSRS: Dissector for LBMSRS protocol dissector
This is the dissector for the LBMSRS protocol which
comes under the 29West protocol suite

Bug: 16466 - LBMSRS sample capture file uploaded in this bug
Change-Id: I7458783f8cff5179064fbd68e910c162db1c5fd7
Reviewed-on: https://code.wireshark.org/review/36917
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-04 18:00:50 +00:00
Alexis La Goutte ea2c7adb22 asterix: fix extra semi
Change-Id: Id8fe27868722854732bd4f53190f4115bfcb53b0
Reviewed-on: https://code.wireshark.org/review/37093
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-04 18:00:16 +00:00
David Perry c143dfa544 MIME/pcapng: reset interface array on new SHB
When reading a new SHB in a pcapng file, reset the array of interface
descriptions to empty. No blocks that follow will be referring to
interfaces from the previous section.

Ping-Bug: 16526
Change-Id: Iaa4257e3392bb829445aab1f79b54334f5db0263
Reviewed-on: https://code.wireshark.org/review/37092
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-04 17:46:50 +00:00
Aurelien Aptel 9e299c1166 ui/capture.h: add missing include to fix build with GCC 9.3
ui/capture.h has a function prototype using capture_file struct
without it being defined yet. This fails to compile with recent
GCC (9.3.1)

Bug: 16547
Change-Id: I84f932de2e7ed70f14aa157b9c3b1d1f80b0016f
Signed-off-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-on: https://code.wireshark.org/review/37024
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-04 11:22:22 +00:00
Adam Mitz df5b18f437 RTPS: avoid warning from Conflict Check
Change-Id: I1c22a822e7b2729af801b1ebdde43527018b922b
Reviewed-on: https://code.wireshark.org/review/37026
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-04 07:15:53 +00:00
Guy Harris f3ddcb96a3 pcapng: pull the interface ID handling into a single routine.
Have a routine that takes an interface ID as an argument and:

	if it's within range, fetches the interface description and
	returns a pointer to it;

	if it's not within range, adds an expert info and returns NULL;

and have the code to dissect blocks with interface IDs just call it.

Change-Id: I705fe94a9a5fb5a27650465f3c55e0dc1b6fbd23
Reviewed-on: https://code.wireshark.org/review/37090
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 23:03:10 +00:00
Guy Harris c9735a3da9 Generate a dummy description if we don't have an interface name.
Just have a display name and description of "(Unknown)" if we have no
display name, no description, *and* no interface name.

Change-Id: I8403779c17c1e6d96d5ba29941081f560ad5339c
Reviewed-on: https://code.wireshark.org/review/37086
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 21:22:17 +00:00
Guy Harris bd963200ce Clean up some issues with get_iface_list_string().
Remove an assignment of NULL to a variable when it's in a branch of code
where the variable's already known to be NULL.  Found by PVS-Studio.

Pull get_display_name_for_interface() into the one place it's used.
That:

    allows us to eliminate a test as, inside the loop where it's called,
    the loop index is what's passed to it, and the loop tests whether
    it's in range, so the test will never fail;

    means we just set interface_opts once, for both of the places it's
    used.

Then we fix that code so that it sets interface_opts->descr to a
generated descriptive name if it *is* null, rather than if it's *not*
null.

That should clean up some issues found by 1) PVS-Studio and 2) me.

Change-Id: I4188ca8f5c7306477ef11117016691d1c9f0267f
Reviewed-on: https://code.wireshark.org/review/37082
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 20:45:29 +00:00
Guy Harris 90fdb71bf6 pcapng: show some fields in decimal, not hexadecimal.
The interface ID is just an ordinal; there's no reason to show it as hex
(we don't show it as hex if we're treating a pcapng file as a capture
rather than a file to be dissected).

The packet drops count is just a count, so, again, there's no reason to
show it as hex.

The hash algorithms numbers are given in decimal in the pcapng spec, so
display it as decimal.

Change-Id: I93fd50e7243a5b012bd29324f7116e634aca62af
Reviewed-on: https://code.wireshark.org/review/37072
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 19:26:32 +00:00
Martin Mathieson 0b1e27ec77 voip_calls: Fix leak of GString from unistim handling.
/opt/SourceCode/wireshark/ui/voip_calls.c	3786	err	V773 The function was exited without releasing the 'g_tmp' pointer. A memory leak is possible.

Tested with unistim_call.pcap from SampleCaptures.

Bug: 16335
Change-Id: I8518a3e277e8acec15e09ca5f36672b5bdd181fe
Reviewed-on: https://code.wireshark.org/review/37028
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 19:07:53 +00:00
Martin Mathieson 6ba8bd037f Some more issues identified by PVS-Studio.
/opt/SourceCode/wireshark/epan/dissectors/packet-osc.c	367	err	V562 It's odd to compare 0 or 1 with a value of 0.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	960	note	V576 Incorrect format. Consider checking the eighth actual argument of the 'proto_tree_add_subtree_format' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	980	note	V576 Incorrect format. Consider checking the third actual argument of the 'proto_item_append_text' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	2473	note	V576 Incorrect format. Consider checking the fourth actual argument of the 'col_prepend_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	2482	note	V576 Incorrect format. Consider checking the fourth actual argument of the 'col_append_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	2633	note	V576 Incorrect format. Consider checking the fourth actual argument of the 'col_append_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	2650	note	V576 Incorrect format. Consider checking the fourth actual argument of the 'col_prepend_fstr' function. The SIGNED integer type argument is expected.
/opt/SourceCode/wireshark/epan/dissectors/packet-stun.c	565	warn	V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/epan/dissectors/packet-umts_fp.c	4126	warn	V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/epan/dissectors/packet-umts_fp.c	4942	warn	V1051 Consider checking for misprints. It's possible that the 'reported_length' should be checked here.
/opt/SourceCode/wireshark/ui/voip_calls.c	1444	err	V773 The 'comment' pointer was assigned values twice without releasing the memory. A memory leak is possible.
/opt/SourceCode/wireshark/wsutil/filesystem.c	1531	err	V773 The function was exited without releasing the 'files' pointer. A memory leak is possible.
/opt/SourceCode/wireshark/wsutil/filesystem.c	1717	err	V773 The function was exited without releasing the 'files' pointer. A memory leak is possible.

Bug: 16335
Change-Id: I8df3ba6d070823dcb43c4152d9156358f701e8dc
Reviewed-on: https://code.wireshark.org/review/37069
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 19:04:30 +00:00
Guy Harris 60622e63fd pcapng: fix more interface ID checks.
Fix the check for the Interface Statistics Block as well.

Make the check for the Simple Packet BLock similar to the other checks -
at the beginning, set interface_id to 0 and then check interface_id
against the size of the array.

Change-Id: Ib05255fe13eca6292447f365b62ff3094805bd4a
Reviewed-on: https://code.wireshark.org/review/37071
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 18:46:33 +00:00
Guy Harris 29340f1b33 pcpang: fix test for missing IDB.
*Any* packet block can have an invalid interface ID; that's not just an
error in the first packet block.

For Enhanced Packet Blocks and Packet Blocks, you can have an invalid
interface ID even if you've already seen one or more Interface
Description Blocks; you have to check whether the interface ID is >= the
number of IDBs we've seen.

Change-Id: I33268d224ef3ad928ad9c000027fb6783806b978
Reviewed-on: https://code.wireshark.org/review/37070
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 18:12:30 +00:00
David Perry 1a9c5364d1 pcapng: expert info when packet or ISB appear without interfaces
A valid pcapng file must have an IDB before any EPB/SPB/PB/ISB. So check
our interface count when we parse the first such block of a section, and
add expert info if there are no interfaces.

Discovered during work on Bug #16526.

Ping-Bug: 16526
Change-Id: I23ff452fd163a0e4472e0658a905f85ab85d5e9d
Reviewed-on: https://code.wireshark.org/review/36986
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-03 13:12:05 +00:00
Carlo Carraro cac7dd3e80 GTP: add support to decode TPDU as ethernet
Change-Id: Icc2fada80b4d8bea386c64bbdd2dd35e6069c252
Reviewed-on: https://code.wireshark.org/review/37067
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-03 12:52:55 +00:00
Jaap Keuter 1f5c32ae73 doc: update README.idl2wrs to reflect current build system
Change-Id: I35d7420ee41b520437572a0e464ad1a9998bfd30
Reviewed-on: https://code.wireshark.org/review/37068
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-03 12:52:36 +00:00
Prince Paul 35fa77ce96 ASTERIX: Bugfix in CAT021 V0.26 and V0.23
Refer: https://www.eurocontrol.int/publication/cat021-eurocontrol-specification-surveillance-data-exchange-asterix-part-12-category-21

1. Fix scaling factor of I021_165_ROT from 1.0 to 1.0/4.0
2. Fix length of spare bit in I021/165
3. Fix mask of &hf_021_165_TI from 0x80 (1bit) to 0xc0 (2bits)

Change-Id: I81cf933e918672d3e3e49d6f38b6b9aefb7137c7
Reviewed-on: https://code.wireshark.org/review/37055
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-03 09:56:20 +00:00
Tomasz Moń db717c2c01 FTDI FT: Do not finalize empty composite tvb
Simply free RX tvb if there isn't any actual RX payload.

Ping-Bug: 11743
Change-Id: I05b6818cf7889a44730c4d44980947cece65395e
Reviewed-on: https://code.wireshark.org/review/37025
Petri-Dish: Tomasz Moń <desowin@gmail.com>
Reviewed-by: Filipe Laíns <lains@archlinux.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Tomasz Moń <desowin@gmail.com>
2020-05-03 09:43:02 +00:00
Gerald Combs bf3d14ca4e [Automatic update for 2020-05-03]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Iee0627e305ea5b5b9b01c69175a0ea8a52195586
Reviewed-on: https://code.wireshark.org/review/37062
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-05-03 08:08:59 +00:00
Guy Harris c22b2ccd94 stats_tree: plug a memory leak.
Don't allocate the GString until we know we'll be using it.

Change-Id: I97e2f897795ada864cbacc3822d39e7348a93ca2
Ping-Bug: 16335
Reviewed-on: https://code.wireshark.org/review/37048
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 01:25:26 +00:00
Martin Mathieson b99dcf0593 Fix some issues seen with a fresh run of PVS Studio
/opt/SourceCode/wireshark/epan/dissectors/packet-aoe.c	328	warn	V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 323, 328.
/opt/SourceCode/wireshark/epan/dissectors/packet-aprs.c	1148	warn	V1037 Two or more case-branches perform the same actions. Check lines: 1148, 1161
/opt/SourceCode/wireshark/epan/dissectors/packet-lsd.c	127	err	V547 Expression 'strlen("cookie") == 0' is always false.
/opt/SourceCode/wireshark/epan/dissectors/packet-rpc.c	3385	warn	V547 Expression 'conversation == NULL' is always true.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort-config.c	465	note	V576 Incorrect format. Consider checking the fourth actual argument of the 'g_snprintf' function. Under certain conditions the pointer can be null.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort.c	630	warn	V768 The variable 'condition' is of enum type. It is odd that it is used as a variable of a Boolean-type.
/opt/SourceCode/wireshark/epan/dissectors/packet-snort.c	969	warn	V547 Expression '!attempt_match' is always false.

Bug: 16335
Change-Id: I93bbc40f0467ebaab74335f6edc7d60e1c600a94
Reviewed-on: https://code.wireshark.org/review/37044
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 00:26:33 +00:00
Guy Harris bab7b8d638 prefs: plug a memory leak.
Don't allocate the cols_hidden GString until we know we need it.

Change-Id: I02966d2820efeb5d61d259a567bf9063d8b519f1
Ping-Bug: 16335
Reviewed-on: https://code.wireshark.org/review/37043
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-03 00:06:57 +00:00
Guy Harris 95073e299c epan/color filters: plug a memory leak.
Change-Id: Ibda5266e6b6a612cf7add319dcb8e3da93b57da0
Ping-Bug: 16335
Reviewed-on: https://code.wireshark.org/review/37038
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-02 23:05:25 +00:00
Dario Lombardo 778c708965 travis: allow ppc64le builds fail.
Bug: 16544
Change-Id: I12be3ae11575f80b3679f4cc185661ad026fabaf
Reviewed-on: https://code.wireshark.org/review/36997
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-05-02 22:31:00 +00:00
Guy Harris 3618aa2cc6 epan DTD parser: don't leak the full path string on error.
While we're at it, fix a return - the return value is a pointer, with
NULL meaning error, not a Boolean, with FALSE meaning error, so return
NULL, not FALSE.

Change-Id: Ie77fe2c6173293a2a202ad29a6c5033e2a401aa7
Ping-Bug: 16335
Reviewed-on: https://code.wireshark.org/review/37033
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-02 22:18:58 +00:00
Martin Mathieson 4067652c86 Fix memory leak in export_object.c
/opt/SourceCode/wireshark/epan/export_object.c	106	err	V773 The function was exited without releasing the 'ext_str' pointer. A memory leak is possible.

Bug: 16335
Change-Id: Ic4811dabe2de9f9e7793f276336d2a87665e5791
Reviewed-on: https://code.wireshark.org/review/37027
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
2020-05-02 21:41:09 +00:00
Adam Mitz 6967d04544 RTPS: in parameter lists ID 15 is used for DomainId, not deprecated
Change-Id: I058e096e09ce23d888e33961692af07706811f62
Reviewed-on: https://code.wireshark.org/review/37014
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-02 17:52:22 +00:00
Adam Mitz a367b0c55d RTPS: Updated built-in entity names and values to match spec
Change-Id: Ibe8115b068236e52e26a2c178a1ae724c1112663
Reviewed-on: https://code.wireshark.org/review/37016
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2020-05-02 17:52:17 +00:00