Commit Graph

72222 Commits

Author SHA1 Message Date
Peter Wu 55c6038fb0 xnap: fix use-after-free of "xnap_conv->addr_a"
Fix wrong memory scope to address a heap-use-after-free via:

    addresses_equal epan/address.h:218:10
    dissect_xnap_T_rrc_Context_01 epan/dissectors/asn1/xnap/xnap.cnf:127

Change-Id: I38bb64c2c8809cb1224d2c44076255d1789c4d5e
Fixes: v2.9.0rc0-1116-gcc5701fbb1 ("XnAP: add dissector based on v15.0.0")
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9199
Reviewed-on: https://code.wireshark.org/review/28658
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-08 15:24:44 +00:00
Gerald Combs 0e043692ec [Automatic update for 2018-07-08]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Ice44cde2e4894d9709c4460baa823777fbe2b5f8
Reviewed-on: https://code.wireshark.org/review/28653
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-07-08 08:15:18 +00:00
Bruno Verstuyft c0ca2c5534 XRA: adding missing packettypes and tlvs
Change-Id: I2980505121014ed5e4c86a959e741d9b18cea082
Reviewed-on: https://code.wireshark.org/review/28648
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-06 19:00:59 +00:00
Dario Lombardo 7e000c9661 travis: fix typo.
Change-Id: Id5613fd9aa506d62e7a48585d6ea13c3db100068
Reviewed-on: https://code.wireshark.org/review/28650
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 14:30:51 +00:00
Pascal Quantin fed08d380f E1AP: add dissector based on v15.0.0
Change-Id: Ic939d5f614de9c3b1204c92007b2aa3ee1e45f8f
Reviewed-on: https://code.wireshark.org/review/28649
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-06 13:40:50 +00:00
Peter Wu caa8efa0d2 tests: add regression tests for Follow TCP Stream
Verified that the tests failed without the fixes for the linked bugs.
The tests have full statement coverage(*1) for check_follow_fragments
and follow_tcp_tap_listener. For details and Scapy script, see:
https://git.lekensteyn.nl/peter/wireshark-notes/commit/crafted-pkt/badsegments.py?id=4ecf9d858b49e76d8a9c29df01ce1bd523ae6704

 (*1) except for `if (data_length <= data_offset) { data_length = 0; }`

Change-Id: I625536df375272cf6c9116231194c39df1217fae
Ping-Bug: 13700
Ping-Bug: 14944
Reviewed-on: https://code.wireshark.org/review/28618
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 12:11:09 +00:00
Guy Harris 11871bee1c Plug extension list leak.
Change-Id: Ie3d2d5fb76ca5de2488e270771b94f7374a8838f
Reviewed-on: https://code.wireshark.org/review/28640
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 09:58:46 +00:00
Guy Harris 238c7dd61d Don't use QFileInfo()::baseName().
It strips off all suffixes, which is not useful behavior; it assumes
that nobody uses "." for any purpose other than separating a file name
from an extension - 1994 called, they want their version of Windows
back (and UN*X called, too...).

For the "Saving XXX" status bar message, just use the entire last
component of the file name.

Change-Id: Ib34fde3e49cd791c7baf333eebb71a8dbd672c19
Reviewed-on: https://code.wireshark.org/review/28638
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 09:47:07 +00:00
Guy Harris aab5ad074e Fix the calculation of a file's "basename".
Strip off only extensions that correspond to file types we know about;
QFileInfo::baseName() strips off *all* extensions, where "extension" is
"anything preceded by a .", so it turns foo.bar.pcap.gz into foo, not
foo.bar.  We don't want that; instead, we strip off only those
extensions that correspond to file types we know how to read, so we'd
strip off .pcap.gz in foo.bar.pcap.gz, and strip off .pcap in
foo.bar.pcap, leaving foo.bar in both cases.

Change-Id: I5385921ad2f0fef815d52e9902fef15735fd9dae
Reviewed-on: https://code.wireshark.org/review/28636
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 09:07:52 +00:00
Dylan Ulis 140f95a0ca CIP: Various I/O updates
1. CIP Generic I/O: Add a "Decode As" option for CIP Class 1
2. Combine the 2 CIP conversation filters into one. There would never have
been more than 1 selected. This should be easier for users and less
clutter in the conversation menu.
3. CIP Safety: Name the data field as cipsafety.data instead of
enip.connection_transport_data, to make it like other CIP I/O data.
4. Minor: Rename some more variables/functions from enip to cip, to
reflect which actual protocol these are.

Change-Id: Id895f412e3584a5efcb7e69175a1b2bb3d5e9627
Reviewed-on: https://code.wireshark.org/review/28610
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 08:45:42 +00:00
Dylan Ulis 80c4cf05a4 Developer Guide: Updates
1. Use proto_tree_add_bitmask for the flags example
2. GLib download link was dead
3. Remove old frontend information. I can't find any download for
hethereal, and Packetyzer is so old that it's not useful for any current
developers.

Change-Id: Ifa0a7363fccb95fb2ef315d84fbbcf7414ae6a6d
Reviewed-on: https://code.wireshark.org/review/28632
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>
2018-07-06 07:31:40 +00:00
Alexis La Goutte 9c4d312822 cisco-fp-min: fix indent (use 4 spaces)
Change-Id: I0c485d33f17d21d76719394fd704c859eb9422e4
Reviewed-on: https://code.wireshark.org/review/28635
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:28:30 +00:00
Peter Wu 7a3f397c2b Qt: fix wrong Follow Stream text position after changing mode
When switching from ASCII to other modes (such as Hex), the previous
text to packet number mapping was not cleared. This resulted in
using the wrong packet number when hovering over the packet data.

Change-Id: I29ba1786925490c33fc9181373a31d51f5091642
Reviewed-on: https://code.wireshark.org/review/28614
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:27:55 +00:00
Peter Wu 59192f79fc tcp: ignore zero-length payloads for Follow TCP Stream
In the Qt Follow TCP Stream dialog with the ASCII mode, sometimes
selecting the first few bytes would wrongly select a packet with a
higher frame number.

This happens because Qt iterates through the list of payloads, then
stores appends the payload data and maps the new cursor position to the
packet number. If the payload data was empty, then it would overwrite
previous cursor positions.

To fix this, do not add records for empty TCP payloads.

Bug: 14898
Change-Id: I598d73899b56eac3d2a022f108bf097bdd363b5c
Reviewed-on: https://code.wireshark.org/review/28613
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:27:05 +00:00
Peter Wu aecb143e2c tcp: fix Follow TCP Stream for overlapping data
When two segments overlap each other, previously the second segment
would wrongly be appended to the first one while it should only append a
subset from the end of the second segment. (It is assumed that the very
first segment is received in time such that an extension on both the
left and right side of the previous stream is not possible.)

Make sure that "frag_follow_record->data" uses a subset (starting at the
end of the previous stream) instead of the full tvb contents. While at
it, add some documentation and restructure the logic to avoid code
duplication and unnecessary memory allocations.

(From bug 9882:) Tested with hao123-com_packet-injection-filtered.pcap,
it now ignores the new overlapping data. Likewise for overlap-2.pcap.
Tested with retransmission_with_additional_payload.pcapng (bug 13700).
Unfortunately, there is no extra expert info to warn about the
non-matching overlapping segment data, but that is a separate issue.

Bug: 13700
Change-Id: I74a941199d75b23b5d297e4dd534680ae610627d
Reviewed-on: https://code.wireshark.org/review/28597
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:26:32 +00:00
Peter Wu 079d1521c6 tcp: fix Follow TCP Stream with missing (but ACKed) segments
Restore the direction for the first check_follow_fragments call to match
the situation before commit 57acc227f0 (which broke other things, so its
logic was reimplemented in commit v2.3.0rc0-1449-g66fa31415f ("tcp: Fix
Follow TCP tap data and when its tapped.")).

Ensure that the ACK value is checked before processing the sequence
number and payload for the current flow.

Bug: 14944
Change-Id: If8947d7732683a4943f405eb72b1a8526a35a6dc
Fixes: v2.1.0rc0-1339-g57acc227f0 ("KISS the Follow TCP functionality.")
Reviewed-on: https://code.wireshark.org/review/28612
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:25:50 +00:00
Peter Wu 8d117f327f tcp: remove repetitive "follow_record->is_server"
To improve readability, do not repeat "follow_record" a dozen times.
No functional change.

Change-Id: I854434974a94d69d4591ad1bc3acf911073b0923
Reviewed-on: https://code.wireshark.org/review/28596
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:25:02 +00:00
Peter Wu c40c26c04c Follow Stream: ensure linear performance with many packets
Reverse the payload chunks list to achieve a running time of O(n) rather
than O(n²) for insertion of all chunks. Executing a RelWithDebInfo+ASAN
build with `tshark -r chargen-session.pcapng.gz -qz follow,tcp,hex,0`
previously took 11m5s to complete, but now finishes in 16 seconds.

Tested using a capture file with 152k TCP packets (from bug 11777).
Backport note: must update ui/gtk/follow_stream.c too.

Change-Id: Icf70d45f33d4399e53209fb6199d3809608c8d99
Reviewed-on: https://code.wireshark.org/review/28595
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-06 07:24:46 +00:00
Guy Harris 2d36c475f9 Use the display name in "Save As..." output for statistics taps.
Change-Id: I78ecc2db6cf0020a51637b1595f2b001d66addf4
Reviewed-on: https://code.wireshark.org/review/28633
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 02:11:09 +00:00
Guy Harris 874c978bbc Use the file *base* name for statistics graphs etc..
For example, if the file is foo.pcap, make the default name for a saved
PDF of some graph be foo.pdf, as it was prior to 2.6, not foo.pcap.pdf.

Change-Id: Ide99c9c7fa1f3d16f829e731f968a209fbb52b8d
Reviewed-on: https://code.wireshark.org/review/28624
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 00:31:45 +00:00
Guy Harris d8df975e2e Change the print preview if "include column headings" changes.
While we're at it, sort some method declarations and definitions, to
group the top-level summary/details/bytes yes/no options together, with
two groups of suboptions for summary and details below.

Bug: 14945
Change-Id: Id06dd64e44b18b13e2131482edef46aee3efbd63
Reviewed-on: https://code.wireshark.org/review/28620
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-06 00:11:41 +00:00
Guy Harris d7ce2bece8 Add a "Include column headings" checkbox in export dissections and print.
Bug: 14945
Change-Id: I1c5ed0bc7e738a5c8d65c09f25686549e1e6dd67
Reviewed-on: https://code.wireshark.org/review/28615
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-05 23:49:47 +00:00
Pascal Quantin 2ba45c2556 F1AP: upgrade dissector to v15.2.1
Change-Id: Iaff72ce933ae03a87f41d3d4081bb3f14b37f266
Reviewed-on: https://code.wireshark.org/review/28611
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-05 19:35:55 +00:00
AndersBroman 692849f7ad PFCP: Fix dissection of Network Instance.
Change-Id: I2e9a154ad70adcdc1de494567e95d5d5c7f9b028
Reviewed-on: https://code.wireshark.org/review/28606
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05 13:21:42 +00:00
Robert Sauter eb5f330ebf wisun: fix remove EAPOL-ready field; add Routing Cost to info
The EAPOL-ready field has not been part of the specification since
before this dissector has been created.

Change-Id: I7bd25a44ad3ee61e7a2a3b105f7bbffb1e28b31f
Reviewed-on: https://code.wireshark.org/review/28602
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-07-05 11:57:09 +00:00
Jaap Keuter ab6f89cae1 Make source file not executable
Change-Id: Idc532c1b2d3848c1611c593b13f93f82c4c020e9
Signed-off-by: Jaap Keuter <jkeuter@aimvalley.nl>
Reviewed-on: https://code.wireshark.org/review/28603
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05 10:21:16 +00:00
Bruno Verstuyft 738818fe4d DOCSIS: Added decoding for OPT (OFDM Downstream Profile Test) messages
Change-Id: I6cbd789d48cc08411938ab2d4b3365e7628efb6d
Reviewed-on: https://code.wireshark.org/review/28591
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05 02:54:43 +00:00
Alexis La Goutte 750660d60f tap-rtp-common: fix comma at end of enumerator list [-Wpedantic]
Change-Id: I8b66da3dcb3ad0c8b99e196d0c8c882388f8c5db
Reviewed-on: https://code.wireshark.org/review/28593
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-05 02:45:16 +00:00
Guy Harris 9e480c51bb Distinguish between "reserved for implementation" and "reserved for future use".
Some flags in the connectionless PDU header are "reserved for
implementation", which presumably means an implementation can set them
to 0 or 1 and use it to send information to a compatible implementation;
others are "reserved for future use" and "must be set to 0".

Don't test the "reserved for implementation" flags in the heuristic, and
show them as "Reserved for implementation" and show the others as
"Reserved for future use (MBZ)".

Bug: 14942
Change-Id: Iff40f155e057301096fec1dbb68f71d041508ff1
Reviewed-on: https://code.wireshark.org/review/28598
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 22:52:13 +00:00
Guy Harris 1c6dc6d31f Some fixes.
For filePath() and fileName(), just return a null string if we can't
convert from the native encoding to UTF-8 - those aren't used for
displaying, those are used for setting the main window's file name and
for generating names of files to save based on the capture file name.

Have fileDisplayName() just return the display name, without
"[closing]"/"[closed]" decoration or a special case for no file being
open (just return a null string if there's no file open), and have
fileTitle() return the decorated display name.

Change-Id: I244f318d5444dcf58527e5d38c4d073c28b73810
Reviewed-on: https://code.wireshark.org/review/28594
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 17:45:47 +00:00
Pascal Quantin 018025e3bc LPPa: upgrade dissector to v15.0.0
Change-Id: I59ecbd3aab030208f9665e4c7e683c5fa1e47df4
Reviewed-on: https://code.wireshark.org/review/28592
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-04 13:53:02 +00:00
Pascal Quantin d052974332 X2AP: fix dissection of SgNB to MeNB Container
Bug: 14940
Change-Id: I42706789cd073fab1a0a7283f009c2f30751579d
Reviewed-on: https://code.wireshark.org/review/28590
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-07-04 05:58:36 +00:00
Guy Harris 9655acc757 fileTitle -> fileDisplayName.
That more closely matches the name of the file.h routine that it uses.

Change-Id: Ia206fb8331f4f3ad8035da9f6137ad2428d53a49
Reviewed-on: https://code.wireshark.org/review/28589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 02:09:04 +00:00
Guy Harris 60d5c04dc3 We have cf_get_display_name(); use it to get the title bar string.
Change-Id: I318472670722d24c3d3896cbd1e88623f5adb297
Reviewed-on: https://code.wireshark.org/review/28588
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 01:41:33 +00:00
Guy Harris a442fd512b Set the file path for a main window if it's not a temporary file.
That's needed to support the "proxy icon", so it can be dragged.

Change-Id: I1ad209cd43a2a6df9c52d076f6513780b0ac51be
Reviewed-on: https://code.wireshark.org/review/28587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-04 00:52:08 +00:00
Guy Harris 9541945aa2 Just use CaptureFile::fileTitle() in MainWindow::setTitlebarForCaptureFile().
It now does the heavy lifting, so MainWindow::setTitlebarForCaptureFile()
doesn't have to duplicate it.

Change-Id: I97ded85306e625b2c67c3fde62a636ec6818a6f5
Reviewed-on: https://code.wireshark.org/review/28586
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:52:37 +00:00
Guy Harris d76db1de78 CaptureFile.fileTitle() is for display, not for file name processing.
Don't use CaptureFile.fileTitle() if you're constructing a pathname; use
it only if you're constructing a window title.

Change-Id: I40f225ddb07be2f7dc3ae03108dae816846f20c7
Reviewed-on: https://code.wireshark.org/review/28582
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:41:18 +00:00
Guy Harris 670377f491 Don't show temporary file names in title bars.
For dialogs and auxiliary windows, if we have a live capture that hasn't
yet been saved to a permanent location, there's no good reason to show
the temporary file name in the title bar, as:

  it's a random string that doesn't indicate where the capture was done
  and that could confuse people (see, for example, the confusion in bug
  14929, in which somebody referred to the "Follow TCP Stream" window as
  the ".pcap dialog" because its title had ".pcap" at the end, due to
  the capture file being a temporary file and its name showing up in the
  title bar of that window);

  it differs from what the main window title bar shows.

While we're at it, don't assume that the file name in the capture_file
structure is a UTF-8 string - some UN*Xes might not use UTF-8 for file
names.

Change-Id: I0d3dfd5d7f896ea37533daf7089b688710dbabf0
Reviewed-on: https://code.wireshark.org/review/28581
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 22:17:15 +00:00
Joerg Mayer 03200d951d packet-stcsig.c: Improve detection of false positives
Change-Id: Ic4be950dba934f3d4eb407b6d623f95022ef1985
Reviewed-on: https://code.wireshark.org/review/28580
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-07-03 14:43:25 +00:00
Joerg Mayer 18c6408f87 packet-hsrp.c: Fix the display length of some tlv-blocks
Change-Id: I4e4dc682153e226ad4989f5b6b39a11b13abf763
Reviewed-on: https://code.wireshark.org/review/28566
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2018-07-03 14:42:19 +00:00
Peter Wu 8998c91b32 CMake: check Asciidoctor version availability before using it
On Ubuntu trusty, Asciidoctor 1.4 is installed. This does not satisfy
the minimum version requirement (1.5) and should not be used even if the
binary is available.

Change-Id: Iaffd55a5bcb26510b4b59f209768a61c3116d32f
Fixes: v2.5.1rc0-76-g94a0f7c641 ("Switch from AsciiDoc to Asciidoctor.")
Reviewed-on: https://code.wireshark.org/review/28576
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 11:57:54 +00:00
Markus Becker c8938f9ceb ssl-utils: Add missing entry for ECJPAKE in ssl_31_ciphersuite[] and ssl_get_keyex_alg().
Addressing code review comments from Peter Wu.

Bug: 14935
Change-Id: I5e2dbad1ab42c3f958b29092df31d3636d04812c
Reviewed-on: https://code.wireshark.org/review/28569
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 08:35:49 +00:00
AndersBroman 0e19b1cdbf nas5gs: Dissect 2 more IEs.
Change-Id: Ib2edf90cbf276ac2dc4fba30df5fffe1ddc81485
Reviewed-on: https://code.wireshark.org/review/28568
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 08:35:27 +00:00
Peter Wu 2f4cdb97c7 file: add more sanity checks to detect UI/file loading issues
As "cf_read" and "rescan_packets" can end up calling back to the GUI
code, that could destroy "cf->epan" which could result in use-after-free
crashes. While I can find most issues with ASAN, it would be even
better to detect the destructive action in "cf_close".

Change-Id: I72700a60c6786d153c2aaa8478bfdfb16a01dcda
Ping-Bug: 10870
Reviewed-on: https://code.wireshark.org/review/28542
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 07:58:16 +00:00
Peter Wu 536e26c55e Qt: fix crash on opening a capture file while loading/saving another
Closing a capture file while it is being loaded will result in a crash.
As a workaround, disallow closing the capture file. The requested action
(e.g. MainWindow::openCaptureFile) will be silently ignored.

While at it, protect process_specified_records (called when saving
files) similarly to cf_read and fix a crash that occurs when a capture
from the Capture Dialog is started while a file is being loaded:

    file.c:360:cf_close: assertion failed: (cf->state != FILE_READ_IN_PROGRESS)

Bug: 10870 # moving rapidly between large files in a file set
Bug: 13594 # start capture while loading/saving file
Bug: 14351 # open another file while loading file
Change-Id: I6ce8f3163c3fa4869f0299e49909a32594326ce4
Reviewed-on: https://code.wireshark.org/review/28541
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 07:58:00 +00:00
Peter Wu 8a1e517bef file: fix packet list update after dfilter change during live capture
During live captures, "cf->state==FILE_READ_IN_PROGRESS" holds and as
such setting "cf->redissection_queued" from "cf_filter_packets" will
prevent the packet list from being updated (no new packets are added and
display filter changes are not applied).

Fix this by not checking "cf->state" and instead perform an explicit
check to detect the "update_progress_dlg" issue (see original commit).
As "cf->read_lock" is implied by "cf->redissecting", remove that check
as well (see "rescan_packets").

Print a warning instead of aborting in "cf_read" since I am not sure if
that condition is currently prevented by its callers.

Bug: 14918
Change-Id: Ieb7d1ae3cbeef18f17c850ae3778822ee625dc68
Fixes: v2.9.0rc0-1110-g8e07b778f6 ("file: do not perform recursive redissections to avoid crashes")
Reviewed-on: https://code.wireshark.org/review/28538
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 07:57:48 +00:00
Vadim Fedorenko 9ba6d3fbc0 BGP: Break off IPv6 LU NLRI into its own fields
Change-Id: I2c0b521369c30d651a39f49f72bd93986499c96e
Reviewed-on: https://code.wireshark.org/review/28559
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-03 07:54:33 +00:00
Guy Harris 4473ec9295 Update a comment to reflect current reality.
Change-Id: I7abf0173e3febf0f34f5942ffe8ff26780d15752
Reviewed-on: https://code.wireshark.org/review/28575
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 05:37:06 +00:00
Guy Harris e83ec1afa7 Fix various compile warnings.
Use h265_profile_idc_values as the value_string for
h265.general_profile_idc.  Get rid of a duplicate value - 2 is used for
both "Main 10" and "Main 10 Still" profiles, a *separate* part of the
packet indicates whether it's the still picture version or not.

"#if 0" out h265_level_bitrate_values - it's not clear where it should
be used.

Initialize two-dimensional arrays with { { 0 } }, i.e.  an array of
arrays, with the first element of the first array explicitly initialized
to zero, and all the other elements of all the other arrays implicitly
initialized to zero.

Change-Id: Ia2ddc28528dcc49fa7a69685b7e5d08d2cd6b4e7
Reviewed-on: https://code.wireshark.org/review/28574
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 04:44:14 +00:00
Julien Staub d897492197 WSUTIL/PINT: transform macros into static functions
For better type safety

Change-Id: Ida7b98af8c44a52ddac2c4ab0702db2519a0c4af
Reviewed-on: https://code.wireshark.org/review/28570
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-03 03:54:58 +00:00