Commit Graph

70362 Commits

Author SHA1 Message Date
Guy Harris 22dc113852 Don't start command-line taps until we've opened a file or started capturing.
We shouldn't do so until we have something on which to compute
statistics and until we're in file scope, as the taps may use
file-scoped memory, given that statistics pertain to a file.

Change-Id: Ifb568480a3cbbd4dc891015b3bb42da1511ca514
Reviewed-on: https://code.wireshark.org/review/25887
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-18 20:40:47 +00:00
Pascal Quantin d9d6106044 ASN.1: update auto generated dissectors
Change-Id: Ic73e72b3d2e7590eaed07f6eb30f74f4303e7a65
Reviewed-on: https://code.wireshark.org/review/25880
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-18 17:47:40 +00:00
Pascal Quantin 47726eafe5 NBAP: check that DCH ID was initialized before using it
Bug: 14443
Change-Id: I184ed60d09576c00133c74b4376b2cb7106e5f80
Reviewed-on: https://code.wireshark.org/review/25874
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2018-02-18 14:49:12 +00:00
Michael Mann 8760999f64 LLTD: use wider variables to prevent overflow and infinite loops
Bug: 14419
Change-Id: I1adf186a56e87a043077d330d59f18b8e5823cd7
Reviewed-on: https://code.wireshark.org/review/25871
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 14:22:48 +00:00
Michael Mann b6328eba6a DICOM: Prevent infinite loop (dissect_dcm_tag)
uint32 value could wrap around, resulting in infinite loop.

Bug: 14411
Change-Id: I26c73f74adc65c7a5acf22970a54c93a7f7a2344
Reviewed-on: https://code.wireshark.org/review/25873
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 14:21:16 +00:00
Michael Mann 95affa1ef1 USB: Sanity check Darwin USB header to prevent infinite loop.
Bug: 14421
Change-Id: Ifb492b776182507c10664d067f99312af250e6ff
Reviewed-on: https://code.wireshark.org/review/25872
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 14:20:09 +00:00
Uli Heilmeier bee04353b9 DIS: fix Modulation paremter length
According to https://www.sisostds.org/DigitalLibrary.aspx?Command=Core_Download&EntryId=43048
table 5.2.1 modulation paremter is 8 bytes long (and not 16).

Bug: 14441
Change-Id: I5d43411124e554721cfaa6c33561a04c91688aee
Reviewed-on: https://code.wireshark.org/review/25866
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-18 12:18:28 +00:00
Dario Lombardo aef93dba8c gitlab-ci: remove not working clang repos.
Change-Id: Id1a6f07747dec45619b89daa0d8f7acb2bd425ca
Reviewed-on: https://code.wireshark.org/review/25865
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-02-18 09:03:38 +00:00
Gerald Combs 632c6261ca [Automatic update for 2018-02-18]
Update manuf, services enterprise numbers, translations, and other items.

Change-Id: I5b5b729c83aa7017454b7c7d8230415e1834587f
Reviewed-on: https://code.wireshark.org/review/25862
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-18 08:15:54 +00:00
Guy Harris fcea7205a4 Get rid of unnecessary casts.
Change-Id: I6b911dc2fa9b95ce16c63b13bf8cf10f8a1ce7d7
Reviewed-on: https://code.wireshark.org/review/25859
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-18 03:34:08 +00:00
Pascal Quantin 38d784d547 6LoWPAN: break loop in case of unexpected loRHE type
Bug: 14422
Change-Id: I5875dd63282ff645e78a4b0cf5f34ea746ec7dfd
Reviewed-on: https://code.wireshark.org/review/25852
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 02:23:22 +00:00
Pascal Quantin 5d99febe66 S7comm: fix range check to prevent infinite loop when upper bound is 255
While we are at it, fix identification of not last element in a few
places

Bug: 14423
Change-Id: I568530949d09ddfd8c5c58d24050dfed32ce10f5
Reviewed-on: https://code.wireshark.org/review/25851
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-18 02:21:24 +00:00
Guy Harris cae52d27d6 Don't gratuitously cast away constness.
Change-Id: I5d953ba2f89d8c65ae62012f32757acc14108f81
Reviewed-on: https://code.wireshark.org/review/25857
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 23:24:39 +00:00
Guy Harris e61257988e Make all versions of add_unix_interface_ifinfo() static.
That routine is not used outside this file.

Change-Id: I50bd1aee564df1b4bb38602a1a40377b5dd86d5f
Reviewed-on: https://code.wireshark.org/review/25856
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 23:18:12 +00:00
Guy Harris 16348cbddb Clean up missing-prototype warnings.
Add prototypes for the registration routines.

Make routines not used outside this file static.

Change-Id: Icaa7e5877888a0e0299cfd94d7921df8a138d0e1
Reviewed-on: https://code.wireshark.org/review/25854
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 22:54:02 +00:00
Guy Harris 04704e289f Don't gratuitously cast away constness.
Change-Id: I778deaaee1d52c4a5a716f6d23f787e041664deb
Reviewed-on: https://code.wireshark.org/review/25853
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 22:48:53 +00:00
Guy Harris 137da3f106 Don't gratuitously cast away constness.
Change-Id: If442abf521ee79bbaac0a133a64e8c9de3e31c59
Reviewed-on: https://code.wireshark.org/review/25850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:57:58 +00:00
Guy Harris 2530b75e1d Don't gratuitously cast away constness.
Change-Id: I5c80e50c524db6ee80e1529af447db9a26e02f48
Reviewed-on: https://code.wireshark.org/review/25849
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:54:03 +00:00
Guy Harris 55042dc15b Don't gratuitiously cast constness away.
Change-Id: Ie373b7e1079092e01c99939f29d7afdbf465bd8b
Reviewed-on: https://code.wireshark.org/review/25848
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:42:49 +00:00
Guy Harris 23b8d11546 Don't gratuitiously cast constness away.
Change-Id: Ibd43d689cd4d00c26440589a772a818f6c5905c3
Reviewed-on: https://code.wireshark.org/review/25847
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:33:04 +00:00
Guy Harris ef96c91060 Put back casts needed for C++ compatibility.
Change-Id: Ia83d08f62e97478f532da9af0c1cbfef7532b1c7
Reviewed-on: https://code.wireshark.org/review/25846
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:23:11 +00:00
Guy Harris 92f3a0f3e9 Don't gratuitously cast away constness.
Change-Id: I51e7207835190fc87cf7c7cb0cf3a09a0588629a
Reviewed-on: https://code.wireshark.org/review/25845
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:17:54 +00:00
Guy Harris a14c6a8490 Constify a pointer to squelch a warning.
Change-Id: I3e83f79227b080d336b5fef14df1ea75a13238de
Reviewed-on: https://code.wireshark.org/review/25844
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 21:11:48 +00:00
Gerald Combs 1c5d6881de Qt: Another filter expression toolbar layout attempt.
Try hiding and showing the filter expression toolbar in order to update
its layout. This is a bit ham-fisted but seems to be the only way to get
it to work properly after clearing and inserting buttons.

Bug: 14121
Change-Id: Iea851c029c1586abfdb01c639914f6fe97ea29b3
Reviewed-on: https://code.wireshark.org/review/25840
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-17 21:00:06 +00:00
Guy Harris 9826cde91d Constify a bunch of pointers and some casts.
This squelches a bunch of "constness casted away" warnings.

Change-Id: I95949ccbecceea651e7e4acb99f8e69ee0bfc475
Reviewed-on: https://code.wireshark.org/review/25843
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 20:43:22 +00:00
Guy Harris 4fe475492c Use appropriate pointer types rather than guint8 *.
This means we don't lose alignment information that causes spurious
compiler warnings.

Change-Id: I721f180c137bcffbcf7edf88cf8caf52c33fa545
Reviewed-on: https://code.wireshark.org/review/25842
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 20:33:54 +00:00
Guy Harris 397d32b863 dcerpc_decode_as_change() doesn't need to change the old binding.
The search doesn't use the fields we change (if it did, we probably
shouldn't change them, as the old binding might not be found), so don't
change them.

Instead, when we allocate a *new* binding structure, put the new values
into *that* structure.

Squelches a "casting away constness" warning.

Change-Id: I6dbd1a4cbc2415373f4926f443f9756c8113c0be
Reviewed-on: https://code.wireshark.org/review/25841
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 20:20:08 +00:00
Guy Harris 86f2ff6ec0 Yet Another Narrowing Warning to suppress.
Change-Id: I6ec0a04a0ad074849f447164270a7ff4851b698f
Reviewed-on: https://code.wireshark.org/review/25839
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 19:37:23 +00:00
Guy Harris cd443126a4 No need to cast away constness.
Change-Id: I9778f2bf867539f83835d6c04bac201e66b1e5ee
Reviewed-on: https://code.wireshark.org/review/25838
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 19:34:02 +00:00
Guy Harris 8b9dfbaba9 The CRC8 routines don't modify the buffer; make the pointers to it const.
This lets us get rid of some casts that provoke "drops const qualifier"
warnings.

Change-Id: Ia7e0863bd97bc20dbbb810e13778ec78d0cf3c91
Reviewed-on: https://code.wireshark.org/review/25837
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 19:30:35 +00:00
Guy Harris dc8bd7c3a9 Fix argument list in comment.
Oh, and change something up with which we have no evidence whether
Winston Churchill would put or not:

http://itre.cis.upenn.edu/~myl/languagelog/archives/001715.html

http://itre.cis.upenn.edu/~myl/languagelog/archives/001702.html

Change-Id: I7a76d564bdd481de2a56d32aa44c9dfe98a270f6
Reviewed-on: https://code.wireshark.org/review/25836
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 19:04:21 +00:00
Guy Harris 5bf8da8a4c Fix casts.
A gconstpointer is a "pointer to const void", so it should be cast to
"pointer to const XXX".  A "pointer to const pointer to plugin" is a
"plugin *const *".

C's declaration syntax is not one of its strong points.  There's a
reason why the cdecl program, and the Web site that uses it,
http://cdecl.org, exists (as the tag line says, "C gibberish <->
English"), and why I used it to make sure I got this working.

Change-Id: Ia29bb25d17a1255a06b4ace542643c4b494d4977
Reviewed-on: https://code.wireshark.org/review/25835
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 18:41:23 +00:00
Robert Sauter f0393a5975 wisun: Add EDFE support
During an EDFE exchange the source addresses are omitted after the first frame.
Restore the information to enable decryption and 6LoWPAN reassembly.

Change-Id: I9660c81e0536cea56caf104a16e41eaf6c123e09
Reviewed-on: https://code.wireshark.org/review/25819
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-17 18:14:35 +00:00
Stig Bjørlykke 306c1c85cd ldap: Format text used in COL_INFO
Use format_text() on strings from packet used in COL_INFO to
show non-printable characters as C-style escapes.

Bug: 14424
Change-Id: Ibeb18958e0c5877681a18873377ad96d7237490c
Reviewed-on: https://code.wireshark.org/review/25808
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-17 15:15:14 +00:00
Guy Harris 6be0444caf Don't make separate libXXX_generated libraries.
We no longer use different compiler flags for generated and
non-generated files, so we don't need to put them into separate
libraries and then add the files from the generated library into the
main library.

Change-Id: Idbd35510ccb8c9107b4de4199c8b1bcaa6f7a060
Reviewed-on: https://code.wireshark.org/review/25831
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-17 14:47:23 +00:00
Pascal Quantin 49e331c4ce Thread: use wider variables to prevent overflow and infinite loops
Bug: 14428
Change-Id: I5536bdca23b24e41c13c0837d1f50d9db26f864a
Reviewed-on: https://code.wireshark.org/review/25832
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-02-17 14:45:12 +00:00
Gerald Combs 0fa1176c22 Add `-z http_ref,tree` to the tshark man page.
Change-Id: Ia7b229fc4c42bd967ee4315543f58f6c05be5510
Reviewed-on: https://code.wireshark.org/review/25827
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-02-17 08:27:14 +00:00
Gerald Combs a9823dddf3 Qt: Replace the toolbar extension icon.
The QToolBar extension button icon is ugly, particularly on HiDPI
displays.  Replace it with a RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK.

Change-Id: I8822252ff5c328acd23aad345313e7cfafdffa47
Reviewed-on: https://code.wireshark.org/review/25821
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>
2018-02-17 08:26:46 +00:00
Gerald Combs d0b9db8cd8 Qt: Add separators between filter expression buttons.
I've noticed at SharkFest and other places that people sometimes put
square brackets around their filter expression names so that it's easier
to distinguish one button from another.

Add separators between buttons so that this shouldn't be necessary.

Change-Id: I3b1ca42f6417d2045781fc14d594faba4fd00fd5
Reviewed-on: https://code.wireshark.org/review/25820
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>
2018-02-17 08:26:26 +00:00
Guy Harris 459bd4646d Don't have CLEAN_FILES variables for the "clean" source files.
Except for the one directory that (currently) has "not yet clean" files,
epan/dissectors, we don't need a separate variable to keep track of the
"clean" source files.

In the cases where not all files were in CLEAN_FILES, put them into the
variable used to enable -Werror or its equivalent.

Change-Id: Ic4119861c1d9e381adfe31e9977e1ac71d623f5b
Reviewed-on: https://code.wireshark.org/review/25830
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 02:50:24 +00:00
Guy Harris 5f0d50690a Use -Werror except for explicitly listed dirty dissectors.
Use AM_CFLAGS for everything except for libdirtydissectors in
epan/dissectors.  Rename GENERATED_CFLAGS/GENERATED_CXXFLAGS to
DIRTY_CFLAGS/DIRTY_CXXFLAGS, as it doesn't apply to all generated files.

Change-Id: I702b53e185d6972c08d68ef31c05df7b03669daa
Reviewed-on: https://code.wireshark.org/review/25829
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 01:51:59 +00:00
Guy Harris 0ac5c797fe Don't use GENERATED_CFLAGS on generated files, use AM_CFLAGS.
They're now warning-free, as we're disabling the warnings in
Flex-generated code.

Change-Id: I628a60cc416bcab16258124bf3e266ae6e9201b5
Reviewed-on: https://code.wireshark.org/review/25828
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 00:59:42 +00:00
Guy Harris eb6eee72d6 Don't treat radius_dict.l specially.
The warning it gets is for one of the extra warning flags, not turned on
by default, and is rather common (and hard to fix).

Change-Id: Icbc9156ab3862e5921d86b39b936754abe15968d
Reviewed-on: https://code.wireshark.org/review/25826
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-17 00:52:48 +00:00
Gerald Combs a931f49dbb Update the release notes.
Change-Id: If2899febb07a18baf6b0020244ed1b5408c45998
Reviewed-on: https://code.wireshark.org/review/25825
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-02-17 00:03:39 +00:00
Guy Harris 0ee6e43478 Compile text2pcap with -Werror.
Change-Id: If411c518c2373a21b0a601526a8e632be88d65c5
Reviewed-on: https://code.wireshark.org/review/25824
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 23:44:13 +00:00
Guy Harris f4cd45f6fe Treat the text2pcap scanner as clean.
We now disable some warnings on Flex-generated code.

Change-Id: I8ff242dc17e7345e9d5883354e921642cb0118fd
Reviewed-on: https://code.wireshark.org/review/25823
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 23:26:01 +00:00
Guy Harris 4a69d10920 Squelch redundant declaration warnings.
Have the text-to-pcap scanners define a routine that the main code
calls, which both allocates and destroys the scanner.  Don't declare the
Lex-generated routines in a header file we create, declare that routine,
instead.

Change-Id: Icad6a83db1a0dea8ac390315af72383fc99f8513
Reviewed-on: https://code.wireshark.org/review/25822
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 22:40:26 +00:00
Matej Tkac c881ee37d9 [PFCP] Added dissect function for User Plane Inactivity Timer IE
in accordance with 3GPP 29.244 v15.0.0

Change-Id: I27d65d591976edfef13a713cf3a0768915e29256
Reviewed-on: https://code.wireshark.org/review/25803
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-16 21:07:16 +00:00
Guy Harris 72b57ac4ef Use DIAG_OFF_FLEX/DIAG_ON_FLEX more consistently.
Add warning C4267 (size_t to int conversion) with MSVC to DIAG_OFF_FLEX.

Addd -Wshorten-64-to-32 with Clang and GCC to DIAG_OFF_FLEX.

Don't explicitly use #pragma to turn off warnings; use DIAG_OFF_FLEX for
all of them.

If we use DIAG_OFF_FLEX, use DIAG_ON_FLEX, even if we have no section of
entirely included code at the end.

Change-Id: Ibfd44e8954704e9a8bcb1bd8e54f31d28357fffb
Reviewed-on: https://code.wireshark.org/review/25817
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-02-16 19:54:16 +00:00
Peter Wu 09671923ad mac-lte: fix memory leak of mac_lte_msg3_cr_hash
Found by LeakSanitizer with "tshark -i dbus-session -c1".

Change-Id: Icef967755088ef25a9b1f2cd7def97078b274966
Fixes: v2.5.0rc0-1865-g52365a55e4 ("LTE L2 protocols: add FT_FRAMENUM_TYPE for most FT_FRAMENUM fields.")
Reviewed-on: https://code.wireshark.org/review/25818
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2018-02-16 18:15:14 +00:00