aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-02-16Re-implement "Map" feature for EndpointsPeter Wu13-24/+785
This feature was removed in v2.5.1rc0-427-gf529ab5d0a, anticipating that MaxMind would remove support for it in 2019. They have however changed their mind and maintained latitude and longitude information. They recommend displaying an accuracy radius, but the reported values are 50, 100, 200 and 1000km. When implemented literally, a marker in Ireland would cover the whole island plus mainland, so I have instead opted to use a fixed radius of 1km at deeper zoom levels. The old ipmap.html file was outdated and had broken tiles, I rewrote a new one from scratch using the light-weight Leaflet library combined with tiles from OpenStreetMap. This is more mobile-friendly and secure (https, SRI). To improve handling of nearby or overlapping nodes, clustering is used (individual nodes can still be inspected). Browser compatibility results: IE8 is unusable, IE9 partially works (tooltips sometimes disappear and the cluster radius control is gone), IE11 works. Of course Firefox 65 and Chromium 72 have no issues. The map popup description in the generated GeoJSON structure is now split in several properties, allowing presentation to be handled by the HTML page instead of the C code. Bug: 14693 Change-Id: If2ec9c518f7723ac0ab27b6272463356875a0ff2 Reviewed-on: https://code.wireshark.org/review/31952 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-02-16ISIS: Add SRv6 dissection (draft-bashandy-isis-srv6-extensions-04)Taisuke Sasaki2-4/+464
Here is the list of new TLVs: - SRv6 Capabilities sub-TLV - Node MSD sub-TLV (rfc8491) - IPv6 TE Router-ID (rfc5316) - SRv6 Locator TLV - SRv6 End SID sub-TLV - SRv6 End.X SID sub-TLV - SRv6 LAN End.X SID sub-TLV Change-Id: I49c09852d18d28ed7ef678c7e87b8eeef00da602 Reviewed-on: https://code.wireshark.org/review/32040 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-02-16Don't allow NSIS or WiX installers if we aren't building Wireshark.Guy Harris2-0/+22
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-16Remove whitespace from the end of the line.Guy Harris1-1/+1
Change-Id: I9dc504e8f5ab97021876f12376ac2c6f20258288 Reviewed-on: https://code.wireshark.org/review/32052 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-16VS 2017 and later include the redistributables even in Community versions.Guy Harris1-4/+19
Change-Id: I540273976dc0e99620894b45b7fa14093e55aa08 Reviewed-on: https://code.wireshark.org/review/32051 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-15Give the current URL where you can find the VS redistributables.Guy Harris1-1/+4
(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-15html2text: Fix our footnotes.Gerald Combs1-1/+1
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-15Replace Qsort with std::sortAnders Broman2-3/+3
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-15travis: fold msbuild output to remain below the 10k line limitPeter Wu2-2/+44
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-15travis: improve cache handling on WindowsPeter Wu2-9/+93
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-15travis: avoid aborting the build on slow Qt installationsPeter Wu3-8/+74
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-15Rename our .asciidoc files to .adocGerald Combs44-138/+137
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-15NSIS: Add ERROR_PRODUCT_VERSION to the vcredist checks.Gerald Combs1-0/+2
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-15NSIS: Fix packaging.Gerald Combs1-9/+0
Remove leftover help entries. Change-Id: I6c1402ecffda1196a12e4165b91b21d15c4380ca Reviewed-on: https://code.wireshark.org/review/32038 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-14Convert the FAQ to Asciidoctor and remove old help files.Gerald Combs17-2265/+1151
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-14macOS: Try to work around .dmg packaging issues.Gerald Combs1-2/+6
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-14macOS: Packaging and code signing updates.Gerald Combs2-52/+87
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-14couchbase: Add Collections Get ID opcodeBen Huddleston1-3/+19
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-14NAS 5Gs: Updated packet filter componentSwapnil Roy1-43/+56
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-14DCOM - add support for RemoteGetClassObject parsing within ISystemActivatoralexsirr1-1/+30
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-14packet-ptp.c: Add some reserved fields instead of skipping themJoerg Mayer1-0/+29
Change-Id: If8da7027d7eae1284123465bc992a94e10c37757 Reviewed-on: https://code.wireshark.org/review/32020 Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2019-02-14Do all the per-capture-file work in process_cap_file().Guy Harris1-25/+28
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-14CMake: Move the PLUGIN_PATH_ID definition.Gerald Combs1-17/+18
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-13macOS: Fix our plugin path.Gerald Combs4-23/+25
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-13Make some code common between pcap and no-pcap TShark.Guy Harris1-34/+29
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-13Add macros for the pack_flags field.Guy Harris5-69/+143
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-13LTE RRC: add dissection of NR RSRP/RSRQ/SINR fieldsPascal Quantin3-10/+95
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-13frame: fix crash when dissectors add the maximum number of tree items.Dario Lombardo1-0/+23
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-13CMake: disable relocatable builds when dumpcap is being builtPeter Wu1-1/+11
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-13Indicate what changes to make if we remove the version component.Guy Harris1-4/+10
Change-Id: I32fff5c34cfdb15a8102d2657e3380cf66928f66 Reviewed-on: https://code.wireshark.org/review/32002 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-02-13Fix directory containing compiled plugins in macOS.Guy Harris2-7/+12
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-12MacOS: Fix a path.Gerald Combs1-1/+1
Change-Id: Ie964e6294e5351627c6fbc4a6c7f855558bee55c Reviewed-on: https://code.wireshark.org/review/31998 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2019-02-12MacOS: Bundle and packaging updatesGerald Combs3-12/+37
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-12DCM: Fix offset for protocol versionUli Heilmeier1-6/+2
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-12packet-dcm.c: fix reassembly and exportdavid-aggeler1-174/+202
- 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-12json_dumper: escape forward slash in some stringsPeter Wu1-0/+3
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-11NAS 5Gs: Updated PDU session establishment request messageSwapnil Roy1-4/+31
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-11QUIC: fix reserved bits and packet number length in long headersPeter Wu1-0/+2
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-11Qt: Fix Crash in empty Bluetooth windowsMichał Łabędzki3-20/+46
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-11TLS: Add IANA-approved GOST ciphersuitesAndrey Kulikov1-1/+5
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-11appveyor: upload installer artifacts for development branchesPeter Wu1-9/+6
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-11Change maxmind_db_lookup_ipv4 to look more like maxmind_db_lookup_ipv6Peter Wu5-15/+13
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-11maxmind_db: improve debug messages, harden against bad inputPeter Wu1-18/+27
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-11maxmind_db: fix broken GeoIP lookups due to bad address processingPeter Wu1-3/+1
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-11json_dumper: add json_dumper_value_doublePeter Wu3-1/+25
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-11Fix crash when using the "matches" operator on non-UTF-8 dataPeter Wu2-52/+10
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-11CIP: Fix false positive expert infoDylan Ulis2-3/+3
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-11CMake: clear cache variables when a library has changedPeter Wu1-0/+45
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-11CMake: remove unused FindMACOS_FRAMEWORKS.cmake filePeter Wu1-22/+0
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-10f5ethtrailer: set G_REGEX_RAW for platform pattern (cleanup)Peter Wu1-1/+1
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>