Commit Graph

74514 Commits

Author SHA1 Message Date
Guy Harris 7770ad93e2 Don't allow NSIS or WiX installers if we aren't building Wireshark.
In both cases, a file used in the process of building the installer is
generated from the Wireshark binary, so, unless we also arrange not to
put that file in the installer if Wireshark isn't being built, we can't
build the installer.

Have ADD_NSIS_PACKAGE_TARGET and ADD_WIX_PACKAGE_TARGET check whether
we're building Wireshark and fail if we aren't.  That way, *if* we're
including the NSIS or WiX packages in the build files, we fail if we
aren't building Wireshark.

Change-Id: Icfe4d2491bd721cdd5fef424e9a7565c4990defa
Reviewed-on: https://code.wireshark.org/review/32053
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-16 02:31:14 +00:00
Guy Harris 751ab080eb Remove whitespace from the end of the line.
Change-Id: I9dc504e8f5ab97021876f12376ac2c6f20258288
Reviewed-on: https://code.wireshark.org/review/32052
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-16 00:41:44 +00:00
Guy Harris b88e2325bb VS 2017 and later include the redistributables even in Community versions.
Change-Id: I540273976dc0e99620894b45b7fa14093e55aa08
Reviewed-on: https://code.wireshark.org/review/32051
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-16 00:37:05 +00:00
Guy Harris 693d04f281 Give the current URL where you can find the VS redistributables.
(Fix a typoo while we're at it.)

Change-Id: I2129c301ea377a9fb48b3f5abd418f7319659638
Reviewed-on: https://code.wireshark.org/review/32050
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-15 22:17:33 +00:00
Gerald Combs 403f556c30 html2text: Fix our footnotes.
Print <number>: <url> instead of <number>: <number>.

Change-Id: I55fd668c8d5870dbd43868e91f9299d5d5580b3f
Reviewed-on: https://code.wireshark.org/review/32048
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-15 20:53:00 +00:00
Anders Broman 97d34eb1bd Replace Qsort with std::sort
Change-Id: Ia3741e7b3542524370ac69f731db072d19a44616
Reviewed-on: https://code.wireshark.org/review/32044
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 15:10:03 +00:00
Peter Wu e6904308d3 travis: fold msbuild output to remain below the 10k line limit
Fold messages by overwriting the same line via a carriage return),
similar to Ninja. The full log will still contain all messages.

Change-Id: I89cc7d10147ebd21f22d40c8d2c4481b1dd2ab56
Reviewed-on: https://code.wireshark.org/review/32024
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:02:01 +00:00
Peter Wu 45f55ad8ac travis: improve cache handling on Windows
The Travis casher Bash implementation for Windows has bugs. The
workarounds only slow down the build further. Given the lack of feedback
on the casher bugs from Travis CI, let's try to improve it. Hopefully
this will avoid stalls during the cache step.

The "cd .." and "cd build" hack is required due to an annoying bug:
https://travis-ci.community/t/caching-is-broken-after-directory-changes/2279

Change-Id: Iae62aa7e9ef78815d240b91199acfe21549c1af7
Reviewed-on: https://code.wireshark.org/review/32023
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:01:55 +00:00
Peter Wu 0c00b1666f travis: avoid aborting the build on slow Qt installations
Periodically report the installation status to avoid aborting the
installation on slow Qt installations (possibly due to slow network?).

Change-Id: I6b8b8db49f2268d557a5ca2e7b1f08b6ea801fd9
Reviewed-on: https://code.wireshark.org/review/32022
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-15 10:01:50 +00:00
Gerald Combs b658de2fa7 Rename our .asciidoc files to .adoc
As noted in "AsciiDoc Recommended Practices" at
https://asciidoctor.org/docs/asciidoc-recommended-practices/, the
AsciiDoc/Asciidoctor community seems to have settled on ".adoc" as a
file extension and that's the one preferred by the Asciidoctor project.
Update our filenames to match.

Change-Id: I2d352623d42d65d950b64310c3655b0fd177ee8c
Reviewed-on: https://code.wireshark.org/review/32037
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-15 05:17:26 +00:00
Gerald Combs 4bcad12279 NSIS: Add ERROR_PRODUCT_VERSION to the vcredist checks.
If the Visual C++ Redistributable installer returns 1638
(ERROR_PRODUCT_VERSION) treat it as a success.

Bug: 15509
Change-Id: I136704ddc3266abc1a79f0fdcdd0b6cb7e33266e
Reviewed-on: https://code.wireshark.org/review/32041
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-15 05:15:55 +00:00
Gerald Combs 35dde308c4 NSIS: Fix packaging.
Remove leftover help entries.

Change-Id: I6c1402ecffda1196a12e4165b91b21d15c4380ca
Reviewed-on: https://code.wireshark.org/review/32038
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-15 00:09:37 +00:00
Gerald Combs 23c9a1e036 Convert the FAQ to Asciidoctor and remove old help files.
Convert our self-generating FAQ to Asciidoctor via the following steps:

- `help/faq.py > /tmp/faq.html`.
- `pandoc -t asciidoc -o docbook/faq.adoc /tmp/faq.html`.
- Manually clean up the markup using a text editor.

Question and answer content was left intact. Removing or updating
obsolete content will have to be done in a separate change.

The Asciidoctor project uses the .adoc extension, so start using it here
as well.

The contents of the "help" directory appear to have been used for
offline support in help_url.c, but that functionality was removed in
2008 in 242e3b78bc. Its content is covered in the User's Guide and man
pages so remove it.

Change-Id: I9060eefe97cfc137f8b414077c30f814379b576a
Reviewed-on: https://code.wireshark.org/review/32014
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-14 23:11:15 +00:00
Gerald Combs ef0ef16c30 macOS: Try to work around .dmg packaging issues.
The new macOS builder sometimes fails due to busy disk images. Try to
work around the issue by adding a sleep (in case the culprit is
Spotlight) and by forcibly detaching disk images.

Change-Id: I65bd46420e7ae69d03b7c9a15a2bb0385a1cedff
Reviewed-on: https://code.wireshark.org/review/32035
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-14 20:33:01 +00:00
Gerald Combs 81338f1664 macOS: Packaging and code signing updates.
Sign our bundle as described in Apple's Code Signing Guide. Enable the
Hardened Runtime when signing.

Look for packagemaker in our PATH before checking specific locations.

Switch from zlib to bzip2 compression for our .dmg. Sign our .dmg.

To do: Notarization.

Change-Id: Ia6556e67998ff247dd3d77d6f040773e070f66cc
Reviewed-on: https://code.wireshark.org/review/32032
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-14 19:03:17 +00:00
Ben Huddleston 871d16a4de couchbase: Add Collections Get ID opcode
Change-Id: If3f318dbaa98df4d991bd447341d1a27048cae50
Reviewed-on: https://code.wireshark.org/review/32031
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Dave Rigby <daver@couchbase.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-14 18:28:14 +00:00
Swapnil Roy 1283298c95 NAS 5Gs: Updated packet filter component
Change-Id: I1202148a58eacf5fb1752894a4758314d43263c2
Reviewed-on: https://code.wireshark.org/review/32009
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-14 11:30:19 +00:00
alexsirr 979ee717ff DCOM - add support for RemoteGetClassObject parsing within ISystemActivator
Change-Id: I5b6eb8758818c9e5e581a6d8af7fe54ee1d9a1ea
Reviewed-on: https://code.wireshark.org/review/32012
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-14 08:00:42 +00:00
Joerg Mayer 465f02a61a packet-ptp.c: Add some reserved fields instead of skipping them
Change-Id: If8da7027d7eae1284123465bc992a94e10c37757
Reviewed-on: https://code.wireshark.org/review/32020
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-02-14 05:29:00 +00:00
Guy Harris c99882733a Do all the per-capture-file work in process_cap_file().
Open and close the file there, as well as reading it.
Small code cleanup, add comments.

Change-Id: I895dd61c92160649fc9ee1cdcf3df45db3eabe57
Reviewed-on: https://code.wireshark.org/review/32017
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-14 03:00:53 +00:00
Gerald Combs 1c27d782ba CMake: Move the PLUGIN_PATH_ID definition.
Define PLUGIN_PATH_ID where we use it. ENABLE_APPLICATION_BUNDLE is
defined later on, so test for APPLE instead.

Change-Id: I16c3ac3dc0e483fbf89cb1a2cacb2afb416d656f
Reviewed-on: https://code.wireshark.org/review/32016
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-14 02:23:32 +00:00
Gerald Combs aedf6fe1c5 macOS: Fix our plugin path.
In CMake we only used PROJECT_RELEASE_VERSION to construct our plugin
path, so rename it to PLUGIN_PATH_ID. Use a dash to separate version
numbers on macOS in order to allow code signing and a period elsewhere.

In the C code we only used VERSION_RELEASE to construct our plugin path,
so rename it to PLUGIN_PATH_ID.

Change-Id: I02abc591d7857269e8d47b414b61df4b28a25f2d
Reviewed-on: https://code.wireshark.org/review/32013
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-13 23:55:10 +00:00
Guy Harris b3c5fcb67c Make some code common between pcap and no-pcap TShark.
Set the output_file_name variable for -w regardless of whether we were
built with libpcap or not.  If we were built with libpcap, also pass the
flag and its argument to capture_opts_add_opt().

In the reading-a-file code (rather than the doing-a-live-capture code),
use output_file_name as the name of the output file, regardless of
whether we were built with libpcap or not.

This takes a few twists out of the maze of #ifdefs, all different.

Change-Id: I828f1b04dacbf0ea4f3aff36f26cb9a3ffcbc480
Reviewed-on: https://code.wireshark.org/review/32011
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-13 22:57:30 +00:00
Guy Harris b5036134c2 Add macros for the pack_flags field.
Add macros to extract the direction, reception type, and FCS length
fields of the pack_flags field, and add definitions for different
directions and reception types.

Add a macro to construct a pack_flags field value from subfields; this
is for use by non-pcapng file readers (the pack_flags field is just a
copy of the EPB flags option, so that's not needed for pcapng).

Move some #defines for that field from packet-frame.c to wtap.h, and
rename them to match the new macros.

Use the macros rather than rolling our own code.

Fix a variable name in text2pcap.c that apparently had the wrong name,
given the value that was being tested.

Change-Id: Ia788ca4e9f5fabd8d24e6ead5ff1817509f54827
Reviewed-on: https://code.wireshark.org/review/32010
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-13 18:43:27 +00:00
Pascal Quantin bf4fe342e3 LTE RRC: add dissection of NR RSRP/RSRQ/SINR fields
Change-Id: I56f44fd4dc6aa6358be54e200ddc7b27d51778aa
Reviewed-on: https://code.wireshark.org/review/32008
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-02-13 16:46:22 +00:00
Dario Lombardo c96b56d384 frame: fix crash when dissectors add the maximum number of tree items.
When underlying dissectors exceed MAX_TREE_ITEMS, the frame dissector
will fail when adding more items. We make room for the following items
by decrementing the count for the current tree before adding them.

This change will fix all errors where underlying dissectors add MAX_TREE_ITEMS
items to the tree.

Bug: 15448
Change-Id: I03f3191cf1b737ac9ab569fbe5bf77f3a30e2401
Reviewed-on: https://code.wireshark.org/review/31975
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-13 13:32:03 +00:00
Peter Wu e4a6f87088 CMake: disable relocatable builds when dumpcap is being built
dumpcap with capabilities/setuid currently does not start due to missing
libwsutil when installed to a non-standard prefix such as /usr/local.

Bug: 15490
Change-Id: If7427ba9625d3702ab8aac2deeaf37b6d3fda2a0
Reviewed-on: https://code.wireshark.org/review/31995
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-13 11:18:30 +00:00
Guy Harris ce7619040f Indicate what changes to make if we remove the version component.
Change-Id: I32fff5c34cfdb15a8102d2657e3380cf66928f66
Reviewed-on: https://code.wireshark.org/review/32002
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-13 03:25:57 +00:00
Guy Harris aa1f314464 Fix directory containing compiled plugins in macOS.
They weren't getting put in the version-number subdirectory, so the
plugin loader wasn't finding them.

If that causes problems with codesign, then we need to either

	1) figure out how to make it work with codesign

or

	2) for macOS, not put plugins in a version-number subdirectory
	   ***AND*** change the plugin loading process not to look for
	   compiled in a version-number subdirectory.

Change-Id: I58d344b728d05369d35edef4e4e530f10034e930
Reviewed-on: https://code.wireshark.org/review/32000
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-13 03:05:11 +00:00
Gerald Combs 80e33fffce MacOS: Fix a path.
Change-Id: Ie964e6294e5351627c6fbc4a6c7f855558bee55c
Reviewed-on: https://code.wireshark.org/review/31998
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-12 21:48:26 +00:00
Gerald Combs 6fef7cdc84 MacOS: Bundle and packaging updates
Update the code signing portions of the packaging scripts to match newer
versions of macOS.

Change-Id: I5e03611d8db61416955e797edcadfcff1404cc38
Reviewed-on: https://code.wireshark.org/review/31996
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-12 21:04:19 +00:00
Uli Heilmeier 4237718ecb DCM: Fix offset for protocol version
Fix offset for reading protocol version

Bug: 15495
Change-Id: I050ee4db23dbafb9cd4c32ed24fcaff0ace4c752
Reviewed-on: https://code.wireshark.org/review/31987
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-12 15:23:16 +00:00
david-aggeler 975e73939a packet-dcm.c: fix reassembly and export
- Fixed re-assembly and export (consolidated duplicate code)
- Fixed random COL_INFO issues
- Spellings

Change-Id: Ic78fd65e740dd850a6b6250b7715cd5f7ca72353
Reviewed-on: https://code.wireshark.org/review/31973
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-12 13:42:36 +00:00
Peter Wu 089d432040 json_dumper: escape forward slash in some strings
If the JSON output is written in a script tag for a HTML page, be sure
to not to break it.

Change-Id: I1b9ba6a39faf266e8a7bf9befa2899978beb130c
Reviewed-on: https://code.wireshark.org/review/31953
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-12 04:44:00 +00:00
Swapnil Roy 329e54010b NAS 5Gs: Updated PDU session establishment request message
Change-Id: Ib64e3edf18d7444a3acb95c1c1d508f14e678bf2
Reviewed-on: https://code.wireshark.org/review/31947
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-02-11 20:22:46 +00:00
Peter Wu 4129c3efc0 QUIC: fix reserved bits and packet number length in long headers
On the second pass, the reserved bits and packet number length were
always displayed as zero. Be sure to use results from the initial pass.

Bug: 15492
Change-Id: I21a34d618a9933bd3ad26b691e043a62e5fcfb41
Reviewed-on: https://code.wireshark.org/review/31976
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-02-11 20:20:40 +00:00
Michał Łabędzki 9a4393851b Qt: Fix Crash in empty Bluetooth windows
Avoid crashed in context menu in Bluetooth windows when there is no any items.
Also add missing last column in "Copy All" in HCI Summary (fix console warning).

Change-Id: I28af0208c3b1c813d43305f3c0a4bf19f66d3e31
Reviewed-on: https://code.wireshark.org/review/31977
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-02-11 20:16:43 +00:00
Andrey Kulikov 96b9e62a98 TLS: Add IANA-approved GOST ciphersuites
IANA has approved identifiers for GOST (Russian cryptography algorithms)
ciphersuites in ther registry of TLS-parameters:
https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml

Change-Id: Ie59c094ea8a540ea1fc801d8e7392bf9cd39c3a9
Reviewed-on: https://code.wireshark.org/review/31974
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-11 15:26:33 +00:00
Peter Wu 9b8f04bc55 appveyor: upload installer artifacts for development branches
Manually configuring the artifacts at the configuration page does not
work, so let's make artifact uploads automatic again. It was previously
disabled because Dario triggers a lot of builds due to mirroring master.
That issue is now resolved by limiting uploads to other branches.

Change-Id: Id7522c1890ec749b73f9ee16ddbe76a363235663
Reviewed-on: https://code.wireshark.org/review/31962
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-11 09:36:59 +00:00
Peter Wu 5c4458345c Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6
Both functions accept an address in network byte order, but
maxmind_db_lookup_ipv4 does not accept a pointer. Add an indirection and
remove unnecessary memcpy calls. This removes some confusion for me.

Change-Id: I291c54c8c55bc8048ca011b84918c8a5d3ed1398
Reviewed-on: https://code.wireshark.org/review/31951
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:13:37 +00:00
Peter Wu 426107f2b5 maxmind_db: improve debug messages, harden against bad input
Ensure that country, city, etc. are reset when processing new responses.
Otherwise if the new response lacks a City, then it would use the result
of the last query. Harden against bad addresses and print debug messages
if a bad address is detected.

Miscellaneous cleanups: improve debug messages (strip whitespace
earlier, etc.), use g_string_assign when possible.

Change-Id: I2acad5fcc02c5a8bf684e8fb01ee2d688d926990
Reviewed-on: https://code.wireshark.org/review/31950
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:12:19 +00:00
Peter Wu 43692360c4 maxmind_db: fix broken GeoIP lookups due to bad address processing
The "current address" must remain valid until the end of response is
processed, otherwise a bogus entry will be inserted. Move "cur_addr"
outside the block to avoid undefined behavior.

Change-Id: Icc2c64280ffeabd632b51d36d6be2020eb83a6a9
Fixes: v2.9.1rc0-125-g2d9a6c2583 ("maxmind_db: force buffer contain an empty string (CID: 1441961).")
Reviewed-on: https://code.wireshark.org/review/31949
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:10:41 +00:00
Peter Wu 7cc5941f95 json_dumper: add json_dumper_value_double
Add locale-independent version that replaces json_dumper_value_anyf for
floating-point numbers. NaN and -/+Infinity are mapped to null.

Change-Id: I8e7856de480b7bcafe77ddd015239e1257768ced
Reviewed-on: https://code.wireshark.org/review/31948
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <jbwzawadzki@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:09:58 +00:00
Peter Wu 0ca65a66f4 Fix crash when using the "matches" operator on non-UTF-8 data
GRegex is a thin wrapper around PCRE. Inputs (patterns and subjects) are
assumed to be UTF-8 by default (unless G_REGEX_RAW is set). If the
subject is not valid UTF-8, normally pcre_exec will immediately return a
failure. However, as GLib sets PCRE_NO_UTF8_CHECK when G_REGEX_RAW is
given, pcre_exec() will skip the safety check and crash instead.

Fix this by always assuming raw byte patterns. Regression risk: patterns
such as `ö.ï` will no longer match `öñï` since `ñ` is a multi-byte
sequence. Patterns such as `(GET|POST) /` remain functional though.

Bug: 14905
Change-Id: I6450bb83f565d377f82a5dbb01690c5f49acd96f
Reviewed-on: https://code.wireshark.org/review/31935
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:08:53 +00:00
Dylan Ulis f2dc64e9b8 CIP: Fix false positive expert info
Some buffer size checking was off by 1.

Change-Id: Ib99da61f476b6f20abe40311fd2112a8693a7878
Reviewed-on: https://code.wireshark.org/review/31946
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:07:13 +00:00
Peter Wu f54a625682 CMake: clear cache variables when a library has changed
On Windows, whenever win-setup.ps1 installs new libraries, the old
paths become invalid. As a workaround the user can remove CMakeCache.txt
completely or manually delete entries. Removing the whole file might
lose custom options and clearing individual entries is tedious. Let's
handle this automatically.

Some HAVE_xxx variables from check_function_exists calls in PCAP and
ZLIB, and one from check_symbol_exists in KERBEROS are not cleared.
Those special cases would require too much work, the user should
manually clear their cache in this case if needed.

Fixes my local build since CARES, KERBEROS and LibXml2 were updated.
Special care was necessary for LibXml2 as it will not set cache variable
LIBXML2_LIBRARY when LIBXML2_LIBRARIES is already set.

Change-Id: Ic793bdb67161504aadadf221bd7740a0ca31db63
Link: https://www.wireshark.org/lists/wireshark-dev/201902/msg00028.html
Reviewed-on: https://code.wireshark.org/review/31960
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:06:10 +00:00
Peter Wu 203839df3d CMake: remove unused FindMACOS_FRAMEWORKS.cmake file
This was added in v1.99.0-rc1-578-gdbd409d041, but was never used.

Change-Id: Ieb202693d555ff62ff13aca46b0f289f0d4c6cfb
Reviewed-on: https://code.wireshark.org/review/31959
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-11 05:05:49 +00:00
Peter Wu 7bb8d5ad31 f5ethtrailer: set G_REGEX_RAW for platform pattern (cleanup)
The platform is retrieved as ENC_ASCII which signifies that the subject
is not expected to contain UTF-8. Set G_REGEX_RAW accordingly.
Does not fix any crashes, it is just a cleanup.

Change-Id: I61edd0204978d5b1e057b4f1cf8cdf8fb43c2a63
Ping-Bug: 14905
Reviewed-on: https://code.wireshark.org/review/31941
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-10 16:13:12 +00:00
Peter Wu 720c3bdc04 column: set G_REGEX_RAW for the custom column filter
Neither the pattern nor the intended subject (a custom fields filter)
contain UTF-8, so set G_REGEX_RAW accordingly. While a filter such as
`tcp matches "foo\xff"` (with `\xff` being a single byte) was accepted,
it did not trigger a crash though even if the precondition was violated.

Change-Id: I45d76b9abbd942d186dcf70f581121769bbd2d0a
Ping-Bug: 14905
Reviewed-on: https://code.wireshark.org/review/31940
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-10 16:12:59 +00:00
Peter Wu 567fe966b1 extcap: set G_REGEX_RAW to avoid potential crashes
None of the patterns try to match UTF-8 text. Treat the inputs as bytes
to avoid potential crashes on invalid subjects (e.g. malformed data from
an extcap binary, ADB or SSH server).

Change-Id: I6f3113cfd9da04ae3fa2b0ece7b0a3a94312830e
Ping-Bug: 14905
Reviewed-on: https://code.wireshark.org/review/31939
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-10 16:12:46 +00:00