metze/wireshark/wip.git
6 years agohtml2txt.py: replaced 2 occurences of '{}' with equal '{0}' because of CentOS 6.x...
Matej Tkac [Fri, 11 May 2018 12:51:26 +0000 (14:51 +0200)]
html2txt.py: replaced 2 occurences of '{}' with equal '{0}' because of CentOS 6.x+Python2.6.6 issues

Change-Id: Ibf395007e32db70f49b7bdae22fff8c377ae41b0
Reviewed-on: https://code.wireshark.org/review/27457
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agogsm_a_gm: fix potential buffer overrun (read)
Peter Wu [Sat, 12 May 2018 10:19:46 +0000 (12:19 +0200)]
gsm_a_gm: fix potential buffer overrun (read)

When the string "str" is empty, "str+1" is invalid. This function can be
called from functions using SET_ELEM_VARS in packet-gsm_a_common.c which
appear to check the length first, but packet-etsi_card_app_toolkit.c and
packet-camel.c do not. Err on the safe side and do not add the item.

Change-Id: I6bd559593bb10ff0b8bf08a48d828613e3d8ccf5
Link: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=4311
Reviewed-on: https://code.wireshark.org/review/27470
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agobluecom: remove dead stores/increments (found by clang).
Dario Lombardo [Thu, 10 May 2018 15:00:22 +0000 (17:00 +0200)]
bluecom: remove dead stores/increments (found by clang).

Change-Id: I07475225ca2e81ba22d0669a7ef474d76b46e2cb
Reviewed-on: https://code.wireshark.org/review/27445
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
6 years agortmpt: fix dissection of multiple packets on second pass
Peter Wu [Thu, 3 May 2018 21:15:46 +0000 (23:15 +0200)]
rtmpt: fix dissection of multiple packets on second pass

The previous fix for the infinite loop in bug 13347 resulted in loop
termination after one round, resulting in ignoring all but the last
packet in a TCP segment.

Observe that the purpose of this loop is to collect all packets where
"tp->seq" refers to the first offset and "tcp->lastseq" refers to the
last position of the packet. If a full packet "tp" is found, then the
previous packet ends at "tp->seq-1" instead of "tp->lastseq-1" (assuming
no overlapping TCP segments).

The infinite loop from bug 13347 occured because of a single packet of
length 1 (tp->seq=0, tp->lastseq=0) and lastseq-1 overflowed. To address
that, terminate the loop once the begin is reached (tp->seq == 0).

Bug: 14650
Change-Id: Ibef382a09c6481b1024dd64dbc8bde904025f057
Fixes: v2.3.0rc0-2153-gee185445f4 ("rtmpt: Ensure sequence count is incremented for stored fragments")
Reviewed-on: https://code.wireshark.org/review/27319
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoCIP Motion: Various Updates
Dylan Ulis [Tue, 8 May 2018 17:46:14 +0000 (13:46 -0400)]
CIP Motion: Various Updates

1. Feedback Mode: Should only use the lower 4 bits.
2. Axis Response: Add more enumerated values
3. Axis Status: Add more bit interpretations
4. Add more Motion Attributes
5. Minor cleanup

Change-Id: I0a6568ca263afb8d7827961907cb7d0a42b376f4
Reviewed-on: https://code.wireshark.org/review/27400
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agotest: add test for resolved addresses
Peter Wu [Fri, 11 May 2018 10:19:07 +0000 (12:19 +0200)]
test: add test for resolved addresses

Tests that the documented "-z hosts,ipv4" filter actually works and that
the resolved addresses table is correct (it implicitly tests that the
definition of WS_INET_ADDRSTRLEN in wsutil/inet_addr.h is sane).

Change-Id: If7babe665ea5ecb37e38078a9809c88873cb323c
Ping-Bug: 14667
Reviewed-on: https://code.wireshark.org/review/27454
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agocli: make "-z host,ipv4" filter actually work
Peter Wu [Fri, 11 May 2018 10:14:27 +0000 (12:14 +0200)]
cli: make "-z host,ipv4" filter actually work

Respect the "ipv4" and "ipv6" filters and actually restrict the output.

Change-Id: I06ee62ee2c85cb45fb33a52e86ce3698452d175f
Fixes: v1.11.0-rc1-2592-ge3cccd17f4 ("Get rid of some users the addrinfo_list.")
Reviewed-on: https://code.wireshark.org/review/27452
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoCIP: Data Type updates
Dylan Ulis [Thu, 10 May 2018 16:45:01 +0000 (12:45 -0400)]
CIP: Data Type updates

1. Convert lots of things to use the new BASE_UNIT_STRING feature
2. ANSI Symbol: Print size correctly in generated response
3. Attribute Status is a 1 byte value in Get/Set_Attribute_Lists
4. Forward Open: Indicate this is a Safety connection in info column. This is useful because Safety connections aren't obvious from the CIP Class like other connections (eg: Motion)

Change-Id: I8cb00fd0141d75a3e9425d8e618b1f54d12807be
Reviewed-on: https://code.wireshark.org/review/27447
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoMAC LTE: fix mac-lte.slsch.format field
Pascal Quantin [Fri, 11 May 2018 19:21:58 +0000 (21:21 +0200)]
MAC LTE: fix mac-lte.slsch.format field

Bug: 14669
Change-Id: I7326046e3707867d7dfef2e4eb341c95f1b2cdab
Reviewed-on: https://code.wireshark.org/review/27461
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoRemove wireshark-gtk.desktop.
Gerald Combs [Fri, 11 May 2018 17:45:52 +0000 (10:45 -0700)]
Remove wireshark-gtk.desktop.

Change-Id: Iee575c2084b7bcfe503131467cbd226cc33e0f52
Reviewed-on: https://code.wireshark.org/review/27458
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoNSIS: Fixup some uninstall variables.
Gerald Combs [Fri, 11 May 2018 18:00:27 +0000 (11:00 -0700)]
NSIS: Fixup some uninstall variables.

Add back the PROGRAM_NAME_GTK definition, since its links might be left
over from a previous install. Remove the PROGRAM_NAME_QT references,
since it's been the same as PROGRAM_NAME for quite a while.

Change-Id: I79724a6a1c9861ffae9aed6a59d48205a40941cd
Reviewed-on: https://code.wireshark.org/review/27459
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agowsutil: fix WS_INET_ADDRSTRLEN definition on Windows
Peter Wu [Fri, 11 May 2018 09:48:30 +0000 (11:48 +0200)]
wsutil: fix WS_INET_ADDRSTRLEN definition on Windows

On Windows, epan/addr_resolv.c has a different definition of structures
"hashipv4_t" (and "hashipv6_t") because the size of the "ip" member is
dependent on "WS_INET_ADDRSTRLEN". A mismatch resulted in two different
structures where the "name" field got shifted (resulting in empty names
in the resolved addresses table due to leading nul bytes).

Since including ws2tcpip.h for the appropriate definition results in
various compile errors (config.h, packet-dcerpc-misc.h, ...) and the
larger definition is actually not needed, just use constants again.

Bug: 14667
Change-Id: I4f8b300eb977be55f16ac40cacc78a5549e2732f
Fixes: v2.5.0rc0-1503-gde1b26a3c6 ("More ws_inet_ntop() tweaks.")
Reviewed-on: https://code.wireshark.org/review/27453
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoList some removed features in the release notes.
Gerald Combs [Thu, 10 May 2018 15:53:42 +0000 (08:53 -0700)]
List some removed features in the release notes.

Require Qt 5.2 in CMakeLists.txt. Remove some old Qt 4 checks.

Change-Id: I06814b3776b488d55a0ce1a26aaada43fb5e096c
Reviewed-on: https://code.wireshark.org/review/27446
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoNSIS: Modernize the installer and remove GTK+ entries.
Gerald Combs [Thu, 10 May 2018 00:35:26 +0000 (17:35 -0700)]
NSIS: Modernize the installer and remove GTK+ entries.

Migrate the Additional Tasks page to nsDialog. Create it using NSIS
Dialog Designer.

Migrate the Modern UI code (WinPcapPage.ini and USBPcapPage.ini) to
Modern UI2.

Use LogicLib flow control instead of Gotos+labels in more places.

Change-Id: I1a3733f0202ca372456074f43e5ae23b1da4e1b9
Reviewed-on: https://code.wireshark.org/review/27449
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoWiX: Remove remaining GTK+ content.
Gerald Combs [Fri, 11 May 2018 00:14:00 +0000 (17:14 -0700)]
WiX: Remove remaining GTK+ content.

Change-Id: I3dc06b62f8a6afa2de82b2a2a5f7dc8a63400ac3
Reviewed-on: https://code.wireshark.org/review/27451
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoCMake: Remove FindFreetype.
Gerald Combs [Fri, 11 May 2018 00:22:45 +0000 (17:22 -0700)]
CMake: Remove FindFreetype.

Remove the FindFreetype module. It was required by the FindGTK2 module,
but it's no longer used.

Change-Id: Id7575d024b5c13b5800989434a994e3a0dcb2b26
Reviewed-on: https://code.wireshark.org/review/27450
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agowiretap: DPA-400 logfile support
Dirk Eibach [Thu, 3 May 2018 14:10:15 +0000 (16:10 +0200)]
wiretap: DPA-400 logfile support

Wiretap support for reading the Unigraf DPA-400 DisplayPort
AUX channel monitor logfiles.

Bug: 14651
Change-Id: Ia8714a72a9439dd566ef604e001ebf45ecaab76d
Reviewed-on: https://code.wireshark.org/review/27415
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoDisplayPort AUX channel protocol dissector
Dirk Eibach [Thu, 3 May 2018 14:07:44 +0000 (16:07 +0200)]
DisplayPort AUX channel protocol dissector

Dissector for the VESA DisplayPort AUX channel protocol.

Bug: 14651
Change-Id: I5c0c7668bda969086d9d6e5069aad87e929f6340
Reviewed-on: https://code.wireshark.org/review/27311
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agowsutil: null-terminate string in ws_read_string_from_pipe (CID: 1364684).
Dario Lombardo [Wed, 9 May 2018 12:25:44 +0000 (14:25 +0200)]
wsutil: null-terminate string in ws_read_string_from_pipe (CID: 1364684).

Change-Id: I713e7466843e5ccaa7252744c57c7ac4c7020809
Reviewed-on: https://code.wireshark.org/review/27422
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agonettrace: add g_assert in write_packet_data (CID 1435482).
Dario Lombardo [Wed, 9 May 2018 10:21:37 +0000 (12:21 +0200)]
nettrace: add g_assert in write_packet_data (CID 1435482).

proto_col_str could have been nulled by line 409, but in that case
EXP_PDU_TAG_COL_PROT_BIT is not set, then strlen doesn't get called in
line 432. Coverity raised a false positive and g_assert will pacify it.

Change-Id: Ib22868a549319913c9c2a25ede0b63fed3af6eb0
Reviewed-on: https://code.wireshark.org/review/27424
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agogitignore: add test log files.
Dario Lombardo [Mon, 7 May 2018 13:27:26 +0000 (15:27 +0200)]
gitignore: add test log files.

They are generated by 'test' target and should be ignored.

Change-Id: Ie378c356ba586e826946abfcfcd8faf2c3ad3c2d
Reviewed-on: https://code.wireshark.org/review/27382
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agowslua: fix memleak in Dir.remove_all on error path
Peter Wu [Wed, 9 May 2018 21:10:27 +0000 (23:10 +0200)]
wslua: fix memleak in Dir.remove_all on error path

While at it, use g_build_filename. Found by Clang Static Analyzer.

Change-Id: I5c50f50abb8c16a553586c548ccd1ae6c3cdd8c1
Reviewed-on: https://code.wireshark.org/review/27439
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoRemove a bunch of unused images.
Gerald Combs [Tue, 8 May 2018 21:30:06 +0000 (14:30 -0700)]
Remove a bunch of unused images.

Remove leftover GTK+ UI images.

Change-Id: I17ab057a1bb63a99293ab67f1972ff6a00f3558a
Reviewed-on: https://code.wireshark.org/review/27401
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>
6 years agofp: Avoid changes to info column after payload dissection
Sayuri Mizushima [Tue, 8 May 2018 14:53:34 +0000 (17:53 +0300)]
fp: Avoid changes to info column after payload dissection

Previously info was appended to the end of the info set by
an underlying protocol (mostly rlc/rrc)

Change-Id: I7fe0d8d485f81ed2c108099e76d15c887108164f
Reviewed-on: https://code.wireshark.org/review/27399
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agofp: Fix incorrect framing
Sayuri Mizushima [Sat, 5 May 2018 15:29:33 +0000 (18:29 +0300)]
fp: Fix incorrect framing

A rare case was matching against both dch and pch checks

Change-Id: I1aa01636355a6fb5d0804b184f3f9b58bec99ffd
Reviewed-on: https://code.wireshark.org/review/27367
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agonas_5gs: remove legacy return (CID: 1435476).
Dario Lombardo [Wed, 9 May 2018 15:37:44 +0000 (17:37 +0200)]
nas_5gs: remove legacy return (CID: 1435476).

Change-Id: I99be7b1431f564a147ee3f9090ce93792ecf2b1f
Reviewed-on: https://code.wireshark.org/review/27430
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agozbee-zcl-general: fix typo (CID 1435473).
Dario Lombardo [Wed, 9 May 2018 15:32:43 +0000 (17:32 +0200)]
zbee-zcl-general: fix typo (CID 1435473).

Change-Id: I9a5d06c991c6c0f0b8e89f27cf9e06b8df77f44e
Reviewed-on: https://code.wireshark.org/review/27429
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agopacket-ieee80211: fix infinite loop (CID 1435463).
Dario Lombardo [Wed, 9 May 2018 15:01:44 +0000 (17:01 +0200)]
packet-ieee80211: fix infinite loop (CID 1435463).

Change-Id: I1eee5cc0fa87a6add901f4e86b13e1f4564134cd
Reviewed-on: https://code.wireshark.org/review/27423
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoWindows: Make sure native dialogs handle HiDPI.
Gerald Combs [Wed, 9 May 2018 18:46:56 +0000 (11:46 -0700)]
Windows: Make sure native dialogs handle HiDPI.

Enable per-monitor v2 DPI awareness before displaying native file
dialogs so that they will render correctly on HiDPI displays.
Add some notes about DPI awareness in our manifest and in
wireshark-qt.cpp.

Remove win32_get_ofnsize while we're here.

Change-Id: Ic553fdeea0c05020c3a7ff06f648692cb814b3eb
Reviewed-on: https://code.wireshark.org/review/27435
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoui/tap-rtp-common: fix some memleaks
Peter Wu [Fri, 4 May 2018 20:53:25 +0000 (22:53 +0200)]
ui/tap-rtp-common: fix some memleaks

If a stream with the given parameters was already known, the addresses
and payload_type_name would be leaked. There are potential other leaks
for rtp_stream_info_t (also in Qt RtpAnalysisDialog::showPlayer), but
that requires a more careful analysis. Found by Clang Static Analyzer.

Change-Id: I2fb19464b4c0f89d597a7e6117d219111922b4f2
Reviewed-on: https://code.wireshark.org/review/27346
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoui/voip_calls: fix memleak in is_mgcp_signal
Peter Wu [Fri, 4 May 2018 20:31:29 +0000 (22:31 +0200)]
ui/voip_calls: fix memleak in is_mgcp_signal

Change-Id: I91226fc88f6e200c0c45ff74cc4232521e602fd3
Reviewed-on: https://code.wireshark.org/review/27345
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoQt: fix memleaks in CompiledFilterOutput
Peter Wu [Fri, 4 May 2018 20:21:13 +0000 (22:21 +0200)]
Qt: fix memleaks in CompiledFilterOutput

QString already copies the memory, no need to strdup it. Simplify use of
GString as well (str is NUL terminated). Found by Clang Static Analyzer.

Change-Id: Ic3ba3daa9121736529e0bee2d41adc95a55a3feb
Fixes: v1.99.0-rc1-253-gdf8c4bf264 ("Capture Interfaces Dialog:")
Reviewed-on: https://code.wireshark.org/review/27344
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoQt: fix memleak of profile name on copying a profile
Peter Wu [Fri, 4 May 2018 20:15:14 +0000 (22:15 +0200)]
Qt: fix memleak of profile name on copying a profile

add_to_profile_list (via add_profile_entry) clones the name and does not
own it, so free it afterwards. Found by Clang Static Analyzer.

Change-Id: I340c91b65d97b24a52812fd6f4b85933cfb15f89
Reviewed-on: https://code.wireshark.org/review/27343
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoAlways explicitly set tm_isdst before calling mktime().
Guy Harris [Wed, 9 May 2018 16:31:44 +0000 (09:31 -0700)]
Always explicitly set tm_isdst before calling mktime().

Except in rare cases, we want to set it to -1 so that we let mktime()
determine whether DST/Summer Time was in effect at the given date and
time rather than pretending that we know whether it's in effect or not.

Change-Id: I0ea75317dd308a515cedf4d1260b583e1592cc9b
Reviewed-on: https://code.wireshark.org/review/27431
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoQt: remove unused vars in main_window_preferences_frame (CID 1435498).
Dario Lombardo [Wed, 9 May 2018 10:03:55 +0000 (12:03 +0200)]
Qt: remove unused vars in main_window_preferences_frame (CID 1435498).

Change-Id: Ibd20bdb3f88b3800d2bfa93e32d41c4827e24dcb
Reviewed-on: https://code.wireshark.org/review/27421
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoproto: don't overrun buffer.
Dario Lombardo [Wed, 9 May 2018 10:39:21 +0000 (12:39 +0200)]
proto: don't overrun buffer.

This is shown by a bunch of coverity reports all pointing at this line.
Every buffer has a ITEM_LABEL_LENGTH, but label_mark_truncated access it
at ITEM_LABEL_LENGTH (off-by-one).

CIDs:
1435461
1435462
1435465
1435466
1435471
1435472
1435477
1435481
1435483
1435484
1435485
1435489
1435492
1435500

Fixes: v1.11.3-rc1-1837-gf94674d2fb ("truncate UTF-8 strings only at the boundary between two characters")
Change-Id: I3781c36594f7db880bc9f76b64d261dbc498c0ce
Reviewed-on: https://code.wireshark.org/review/27425
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agoextcap: Fix required indicator
Roland Knall [Wed, 9 May 2018 07:55:32 +0000 (09:55 +0200)]
extcap: Fix required indicator

Fix required indicator on reset and change an assert to a simple
drop-out

Change-Id: I355980223f213fef8ee4c6ac7d6bcb0fce1a7913
Reviewed-on: https://code.wireshark.org/review/27416
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agoQt: Add Show as UTF-16 in Show Packet Bytes
Stig Bjørlykke [Wed, 9 May 2018 08:14:47 +0000 (10:14 +0200)]
Qt: Add Show as UTF-16 in Show Packet Bytes

Change-Id: Ia7c7af162ac0010e2a5b83caf1ac467012432567
Reviewed-on: https://code.wireshark.org/review/27420
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoQt: Add plural translations
Stig Bjørlykke [Wed, 9 May 2018 07:08:02 +0000 (09:08 +0200)]
Qt: Add plural translations

Add plural translations in capture file dialog preview.
Reworded text for "error after X records(s)" to use same format
as similar messages.

Change-Id: I7b2c8811a9c0c0f76587c5aad1a648a1b969f37a
Reviewed-on: https://code.wireshark.org/review/27412
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoQt: Update frame selected in several cases
Stig Bjørlykke [Tue, 8 May 2018 08:50:00 +0000 (10:50 +0200)]
Qt: Update frame selected in several cases

Ensure that frameSelected(0) is emitted when not having a proto tree
field selected because of:

 1. No match when trying to restore selected field
 2. Search selects a packet with no field to select
 3. Current packet is deselected

This will disable functionality which requires a selected field
and updates the status bar according to selected field.

Bug: 14658
Change-Id: I158fae4f26c02f718cee0030ef9e38b597876381
Reviewed-on: https://code.wireshark.org/review/27395
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoYou have to set tm_isdst before calling mktime().
Guy Harris [Wed, 9 May 2018 03:47:58 +0000 (20:47 -0700)]
You have to set tm_isdst before calling mktime().

You either need to tell mktime() that 1) DST/Summer Time is in effect,
2) DST/Summer Time isn't in effect, or 3) we don't know whether
DST/Summer Time is in effect, you figure it out.

We set tm_isdst to -1, to choose option 3), which is what we want.

Fixes Coverity CID 1435496.

Change-Id: I0f22ef1201ee8abefb3fa75aa3432b021fb13cfd
Reviewed-on: https://code.wireshark.org/review/27408
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoYou have to set tm_isdst before calling mktime().
Guy Harris [Wed, 9 May 2018 03:43:22 +0000 (20:43 -0700)]
You have to set tm_isdst before calling mktime().

You either need to tell mktime() that 1) DST/Summer Time is in effect,
2) DST/Summer Time isn't in effect, or 3) we don't know whether
DST/Summer Time is in effect, you figure it out.

We set tm_isdst to -1, to choose option 3), which is what we want.

Fixes Coverity CID 1435496.

Change-Id: Iff24e51807ab42c0e6d9629f72848ad9f8d325fb
Reviewed-on: https://code.wireshark.org/review/27404
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoFix infinite loop.
Guy Harris [Wed, 9 May 2018 03:37:21 +0000 (20:37 -0700)]
Fix infinite loop.

If a variable is a count of items, and we're looping while the count is
non-zero, we need to decrement it after every item we process.

Fixes Coverity CID 1435501.

Change-Id: Iabb0cb6276d4bcf4b1bdea9ec3ba943dac1b9938
Reviewed-on: https://code.wireshark.org/review/27402
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agosmb: fix memleak in export objects
Peter Wu [Fri, 4 May 2018 21:40:40 +0000 (23:40 +0200)]
smb: fix memleak in export objects

"aux_smb_fid_type_string" is used as "%s" argument for g_strdup_printf,
there is no need to clone it. I checked all calls and "fid_type" should
always be valid, but in case of a bug, let's not return a NULL pointer
but "?". Found by Clang Static Analyzer.

Change-Id: I09896638eb5512f22b3d1a227462499e12cedcde
Reviewed-on: https://code.wireshark.org/review/27349
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: ronnie sahlberg <ronniesahlberg@gmail.com>
6 years agoWindows: prioritize Npcap over WinPcap
Pascal Quantin [Mon, 7 May 2018 21:37:31 +0000 (23:37 +0200)]
Windows: prioritize Npcap over WinPcap

It is now considered stable enough to be our default capture driver if present

Change-Id: I7f3cdabcbaea526949afa47164e520202e6b93f2
Reviewed-on: https://code.wireshark.org/review/27393
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agosshdump/ciscodump: use groups in config.
Dario Lombardo [Fri, 4 May 2018 20:36:14 +0000 (22:36 +0200)]
sshdump/ciscodump: use groups in config.

Change-Id: I3d6689738aee32bf720e6ebca1d4462429fdc1eb
Reviewed-on: https://code.wireshark.org/review/27397
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agodtls: Remove period from Version blurb
Stig Bjørlykke [Tue, 8 May 2018 10:58:09 +0000 (12:58 +0200)]
dtls: Remove period from Version blurb

Change-Id: I5e50554daf25d2b2e71795c28e393f08d117ad6f
Reviewed-on: https://code.wireshark.org/review/27396
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoQt: fix IPv4 GeoIP lookup in endpoints dialog
Pascal Quantin [Mon, 7 May 2018 20:05:56 +0000 (22:05 +0200)]
Qt: fix IPv4 GeoIP lookup in endpoints dialog

maxmind_db_lookup_ipv4() expects an address in network byte order

Bug: 14656
Change-Id: Ie47e3ae44d305d040e409d42f4398f55ae8c2395
Reviewed-on: https://code.wireshark.org/review/27391
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Christopher Maynard
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agosharkd: fix IPv4 GeoIP lookup
Pascal Quantin [Mon, 7 May 2018 20:04:14 +0000 (22:04 +0200)]
sharkd: fix IPv4 GeoIP lookup

maxmind_db_lookup_ipv4() expects an address in network byte order

Change-Id: Iaff404e370d8a171fa27bf63cb3d827863e6b0ac
Ping-Bug: 14656
Reviewed-on: https://code.wireshark.org/review/27390
Reviewed-by: Christopher Maynard
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoextcap: Group arguments
Roland Knall [Fri, 20 Apr 2018 12:59:14 +0000 (14:59 +0200)]
extcap: Group arguments

Group arguments together to better present them, as well as to
have the possibility to better facilitate settings categories.

The order of tabs is defined by the numbering of arguments and
their appearance. If no tab can be found or no group has been
defined for the argument, a default tab will be added.

Change-Id: I032881193e09d4ad5d65c9f73fede87695acdace
Reviewed-on: https://code.wireshark.org/review/27054
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agoReport the file name in the "#if/#endif mismatch" error.
Guy Harris [Tue, 8 May 2018 08:44:12 +0000 (01:44 -0700)]
Report the file name in the "#if/#endif mismatch" error.

Change-Id: I54d2b98e471e04a2ad0a8ecc036180af04bb8359
Reviewed-on: https://code.wireshark.org/review/27394
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agowiretap: make open_info_base[] const
Роман Донченко [Thu, 12 Apr 2018 21:35:04 +0000 (00:35 +0300)]
wiretap: make open_info_base[] const

Change-Id: I1e0099d5301f08ee500f17529d6cc3733d3c9a4f
Reviewed-on: https://code.wireshark.org/review/27392
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoBluetooth: ATT: Fix description of few fields
Michał Łabędzki [Sat, 14 Apr 2018 08:17:00 +0000 (10:17 +0200)]
Bluetooth: ATT: Fix description of few fields

Copy-paste issue, fixed description names of:
btatt.weight_scale_feature
btatt.glucose_measurement.sequence_number
btatt.glucose_measurement.type_and_sample_location
btatt.record_access_control_point.response_code

Change-Id: Ifbda28ab86bda0e3dde824c24449d3ed90f8da8f
Reviewed-on: https://code.wireshark.org/review/27362
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoBluetooth: Assigned Numbers: Add Mesh Characteristics
Michał Łabędzki [Mon, 2 Apr 2018 09:45:23 +0000 (11:45 +0200)]
Bluetooth: Assigned Numbers: Add Mesh Characteristics

Additional 65 characteristics to be done later.

Change-Id: Ic7d9a868619d26a49b8e322d1f9bde0ab3753319
Reviewed-on: https://code.wireshark.org/review/27361
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoBluetooth: GATT: Add prepare to implementing FTMS/FTMP
Michał Łabędzki [Sat, 24 Mar 2018 16:28:09 +0000 (17:28 +0100)]
Bluetooth: GATT: Add prepare to implementing FTMS/FTMP

Implement "usage" of those chatacteristics.

Change-Id: I708537909b89f29df19e3bbac339ee37e890f2d0
Reviewed-on: https://code.wireshark.org/review/27360
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agogtp, gtpv2: fix memory leaks in association code (found via ASAN)
Ivan Nardi [Mon, 7 May 2018 06:16:54 +0000 (08:16 +0200)]
gtp, gtpv2: fix memory leaks in association code (found via ASAN)

Change-Id: Id8891dffa3c4db3ec82de3a0597550eb73a1d25f
Reviewed-on: https://code.wireshark.org/review/27380
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agoRevert "wiretap: DPA-400 logfile support"
Guy Harris [Mon, 7 May 2018 17:46:29 +0000 (17:46 +0000)]
Revert "wiretap: DPA-400 logfile support"

This reverts commit dfd6eb5d68065b47cf19603f34300ed43ae5e858.

This change cannot be submitted without change I5c0c7668bda969086d9d6e5069aad87e929f6340.

Change-Id: Ieb22f4e9afa1742db861a291202a2790a4784e1b
Reviewed-on: https://code.wireshark.org/review/27387
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agowiretap: DPA-400 logfile support
Dirk Eibach [Thu, 3 May 2018 14:10:15 +0000 (16:10 +0200)]
wiretap: DPA-400 logfile support

Wiretap support for reading the Unigraf DPA-400 DisplayPort
AUX channel monitor logfiles.

Bug: 14651
Change-Id: I8d3c50575c9806dd04b40053db45564404bad103
Reviewed-on: https://code.wireshark.org/review/27312
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoRefer to the bytes of the real checksum field if the checksum is missing or generated
Joerg Mayer [Mon, 7 May 2018 13:20:08 +0000 (15:20 +0200)]
Refer to the bytes of the real checksum field if the checksum is missing or generated

Change-Id: I6c7a5b1441b97604d2847f7b74abc7a9c9e98d2c
Reviewed-on: https://code.wireshark.org/review/27381
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
6 years agowiretap: Add a file_gets variant that returns a pointer to the NUL terminator
Роман Донченко [Sat, 7 Apr 2018 22:00:46 +0000 (01:00 +0300)]
wiretap: Add a file_gets variant that returns a pointer to the NUL terminator

When using file_gets it's very difficult to determine how many characters
were read, because you can't distinguish between an embedded NUL and
a short line (note that the last line in a file may not have an LF at the
end). While it's still possible to do it via prefilling the buffer with
non-zero values, doing that is cumbersome, inefficient and error-prone.
This new function makes the task much easier.

The "p" in the name is meant to be reminiscent of the "p" in stpcpy.

Change-Id: I468d5ee71e3b6289925860651ba61b369301b3c9
Reviewed-on: https://code.wireshark.org/review/27333
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agopfcp: added IEs 132-139
Joakim Karlsson [Fri, 4 May 2018 21:42:09 +0000 (23:42 +0200)]
pfcp: added IEs 132-139

According to 3GPP TS 29.244 v15.1.0

Change-Id: I1d55314a269ee615bc1730eba70fed095cec3075
Reviewed-on: https://code.wireshark.org/review/27338
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTest: Make sure we run our display filter tests.
Gerald Combs [Sat, 5 May 2018 22:53:54 +0000 (15:53 -0700)]
Test: Make sure we run our display filter tests.

Change the test suite list in CMakeLists.txt to a static list. Add a
CTest coverage unit test.

Change-Id: I8459f320a2d0707618d6d56abdfce80274fddd2d
Reviewed-on: https://code.wireshark.org/review/27377
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agomac-nr: Break down the RAR UL Grant
Martin Mathieson [Fri, 4 May 2018 19:12:05 +0000 (20:12 +0100)]
mac-nr:  Break down the RAR UL Grant

Change-Id: I30df646ba49e1c73e2ba90c43578071841ff317a
Reviewed-on: https://code.wireshark.org/review/27336
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
6 years agoIEC-61850 MMS INFO-Column extended with invokeID, domainID, itemID
Karl Knoebl [Wed, 25 Apr 2018 08:00:27 +0000 (10:00 +0200)]
IEC-61850 MMS INFO-Column extended with invokeID, domainID, itemID

Change-Id: Id4e31cdcba5fcbb8f5f9ce967b97049dc4bb3e72
Reviewed-on: https://code.wireshark.org/review/27143
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agosharkd: support for MaxMindDB.
Jakub Zawadzki [Fri, 4 May 2018 18:38:19 +0000 (20:38 +0200)]
sharkd: support for MaxMindDB.

Call maxmind_db_lookup_process() [via host_name_lookup_process()] before processing request.
It's still buggy, webshark needs a refresh to show endpoint or conversation ipmap,
but it's better than nothing.

It seems to need refresh, cause maxmind_db_lookup_ipv[46] works only for cached entries.

Also cause mmdbresolve is pipe-based, every sharkd need to have it own mmdbresolve process.

Change-Id: I3d588d1fa9e9ba645cc3d0bff3d276b202159d21
Reviewed-on: https://code.wireshark.org/review/27335
Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
6 years ago[Automatic update for 2018-05-06]
Gerald Combs [Sun, 6 May 2018 08:15:37 +0000 (08:15 +0000)]
[Automatic update for 2018-05-06]

Update manuf, services enterprise numbers, translations, and other items.

Change-Id: Idea7c88121649417e332099b0cb71042c809735a
Reviewed-on: https://code.wireshark.org/review/27372
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agozbee-security: fix keyring memleaks
Peter Wu [Fri, 4 May 2018 21:13:48 +0000 (23:13 +0200)]
zbee-security: fix keyring memleaks

If zbee_security_parse_key fails, the cloned label was leaked. Updating
The keyring contents was also leaked. Found by Clang Static Analyzer.

Change-Id: I5ef8e890f5b2b37d562b7f7a85b046bea9559841
Reviewed-on: https://code.wireshark.org/review/27347
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotravis: update to gcc-8 and clang-5
Alexis La Goutte [Thu, 3 May 2018 12:15:14 +0000 (12:15 +0000)]
travis: update to gcc-8 and clang-5

Change-Id: I538f87253241ce3b399bf638514df73447622219
Reviewed-on: https://code.wireshark.org/review/27337
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotcp: fix memleak in Follow TCP tap in error cases
Peter Wu [Fri, 4 May 2018 21:28:30 +0000 (23:28 +0200)]
tcp: fix memleak in Follow TCP tap in error cases

If this not the first data segment and the data is somehow empty
(overlap?) or if the packet is out-of-order, the whole data fragment and
follow_record_t structure was leaked. Found by Clang Static Analyzer.

Change-Id: I81dc7749c738938b14d2cf4ad41e624b15099da6
Fixes: v2.3.0rc0-1449-g66fa31415f ("tcp: Fix Follow TCP tap data and when its tapped.")
Reviewed-on: https://code.wireshark.org/review/27348
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agoTest: Integrate ftsanity directly into our tests.
Gerald Combs [Fri, 4 May 2018 22:14:10 +0000 (15:14 -0700)]
Test: Integrate ftsanity directly into our tests.

Move tools/ftsanity.py to test/suite_unittests.py.

Change-Id: I8582b19c0544d032eb0566bc1e82be385e904c11
Reviewed-on: https://code.wireshark.org/review/27341
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoDon't use dladdr() to get a pathname for the current executable().
Guy Harris [Sat, 5 May 2018 07:19:09 +0000 (00:19 -0700)]
Don't use dladdr() to get a pathname for the current executable().

Change-Id: I24ad11a659c2cb936f873339dc2b36ac9944280a
Reviewed-on: https://code.wireshark.org/review/27359
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoUse dlget() and dlgetname() to get the executable path name on HP-UX.
Guy Harris [Sat, 5 May 2018 06:39:46 +0000 (23:39 -0700)]
Use dlget() and dlgetname() to get the executable path name on HP-UX.

That leaves only AIX (and, if we're looking at dead UN*Xes, IRIX and
Tru64 UNIX) as platforms on which we can't fetch that.

Change-Id: If7a6a425aba30e1abf82ecc66f6c28dc532a227c
Reviewed-on: https://code.wireshark.org/review/27358
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoOn Solaris, check for getexecname in CMake.
Guy Harris [Sat, 5 May 2018 06:00:29 +0000 (23:00 -0700)]
On Solaris, check for getexecname in CMake.

We expect it to be checked for in wsutil/filesystem.c, so we should
check for it.  It's a Solarisism, so check for it only on Solaris.

Change-Id: I09104c17d2ec91c74862b63e735c32a9d188f2a6
Reviewed-on: https://code.wireshark.org/review/27351
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoplugin_if: fix small memory leak in ext_menubar_add_separator
Peter Wu [Fri, 4 May 2018 20:10:46 +0000 (22:10 +0200)]
plugin_if: fix small memory leak in ext_menubar_add_separator

No need to clone memory as ext_menubar_add_generic_entry g_strdups the
label argument. Found by Clang Static Analyzer.

Change-Id: I7ffe3d0cae0093410f2015e6beb8b8e97a871b2a
Fixes: v1.99.6rc0-213-geeed4d1121 ("UI: Implementing menus for plugins")
Reviewed-on: https://code.wireshark.org/review/27342
Petri-Dish: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Roland Knall <rknall@gmail.com>
6 years agopfcp: fix typo.
Dario Lombardo [Fri, 4 May 2018 22:00:08 +0000 (00:00 +0200)]
pfcp: fix typo.

Change-Id: I48adc5a3ae198b06401d7526e013436ee73a51fe
Reviewed-on: https://code.wireshark.org/review/27340
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agonettrace_3gpp_32_423: fix memleak and copy of uninitialized memory
Peter Wu [Fri, 4 May 2018 22:46:20 +0000 (00:46 +0200)]
nettrace_3gpp_32_423: fix memleak and copy of uninitialized memory

When protocol="map", but the name attribute value is invalid, a memleak
occurs. Observe also that dissector_table_str is 22 bytes (21 characters
plus nul) and rounding up to a multiple of 4 means that 2 bytes of
uninitialized memory could be copied. Avoid that by copying the actual
length. Memory leak was found by Clang Static Analyzer.

Change-Id: I41f5b104449e108191e505611411a8fb18f1f5db
Fixes: v2.1.0rc0-2545-g4b4c7a76c3 ("[Nettrace] Add parsing of some HSS records.")
Reviewed-on: https://code.wireshark.org/review/27350
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoTest: Add dftest to our tests.
Gerald Combs [Thu, 3 May 2018 19:05:12 +0000 (12:05 -0700)]
Test: Add dftest to our tests.

Move the dfilter tests and captures from tools to test.

Change-Id: I2e6a6cc1d383c985ba07c76c93ae1c57d3c8f84c
Reviewed-on: https://code.wireshark.org/review/27339
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoGet rid of more autotoolsisms.
Guy Harris [Fri, 4 May 2018 18:45:10 +0000 (11:45 -0700)]
Get rid of more autotoolsisms.

Change-Id: I124732adf3c3da511c206932544b4d533404cfc5
Reviewed-on: https://code.wireshark.org/review/27332
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agodocbook: add "-y" to all windows choco commands.
Dario Lombardo [Thu, 3 May 2018 13:52:18 +0000 (15:52 +0200)]
docbook: add "-y" to all windows choco commands.

This speeds up the copy/paste step-by-step sequence.

Change-Id: Ib2e3ee54c8c86b7357260ecaab5d129ef296a9e9
Reviewed-on: https://code.wireshark.org/review/27309
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agog_slist_free_full: Use g_slist_free_full() in a couple of places.
AndersBroman [Fri, 4 May 2018 08:16:28 +0000 (10:16 +0200)]
g_slist_free_full: Use g_slist_free_full() in a couple of places.

Change-Id: I38617ee289196f9807cf285af60d670bd5477687
Reviewed-on: https://code.wireshark.org/review/27327
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoCMake: fix build by not unnecessarily linking with wsutil
Peter Wu [Fri, 4 May 2018 09:01:16 +0000 (11:01 +0200)]
CMake: fix build by not unnecessarily linking with wsutil

When built with -DCMAKE_BUILD_WITH_INSTALL_RPATH=1, make-taps and
make-dissectors fail to run because they cannot locate libwsutil.so.0.
Since v2.9.0rc0-178-gbb81bef535 ("glib: Get rid of GLIB_CHECK_VERSION as
we now require 2.32.0") wsutil is definitely no longer needed.

Change-Id: Ida269fdb5f2cba979e3776f57c1a6bf3d546fe5d
Reviewed-on: https://code.wireshark.org/review/27329
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoautotools: remove more makefiles.
Dario Lombardo [Thu, 3 May 2018 14:19:17 +0000 (16:19 +0200)]
autotools: remove more makefiles.

Change-Id: Ie0aa418e0515b56f0abfbab4f4c5ebc9edd7b81b
Reviewed-on: https://code.wireshark.org/review/27314
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agol16_mono: fix a typo in CMakeLists.txt
Pascal Quantin [Fri, 4 May 2018 08:24:48 +0000 (10:24 +0200)]
l16_mono: fix a typo in CMakeLists.txt

Change-Id: I344354fa50c14828dd5d430ac6a377766b0afeb6
Reviewed-on: https://code.wireshark.org/review/27328
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
6 years agotravis: use ninja for building.
Dario Lombardo [Thu, 3 May 2018 15:24:10 +0000 (17:24 +0200)]
travis: use ninja for building.

Change-Id: I18cf4c79e6073955d8224c7a37f906ec54a8edbc
Reviewed-on: https://code.wireshark.org/review/27324
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
6 years agoCIP Motion: Attribute Support
Dylan Ulis [Fri, 27 Apr 2018 16:20:27 +0000 (12:20 -0400)]
CIP Motion: Attribute Support

1. Add attribute table similar to the other CIP related dissectors. Currently, this just adds 2 attributes. More will come in separate reviews. (Still clarifying some information in the Spec)
2. Minor wording updates to match spec

Change-Id: I667b8e465d576020471c8e7fc10b43e25ea573dd
Reviewed-on: https://code.wireshark.org/review/27180
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Jim Young <jim.young.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agopfcp: updated UP Function Features IE
Joakim Karlsson [Thu, 3 May 2018 21:21:40 +0000 (23:21 +0200)]
pfcp: updated UP Function Features IE

added flag 6/2 PDIU

Change-Id: Iab0cf7a1def8d0c9949df83b41478ac1f23b3844
Reviewed-on: https://code.wireshark.org/review/27318
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoFix function declaration of ws_buffer_length().
Guy Harris [Fri, 4 May 2018 02:25:18 +0000 (19:25 -0700)]
Fix function declaration of ws_buffer_length().

This makes it match 1) the way the function is defined, if it is defined
and 2) the type returned if it's a macro, not a function.

Change-Id: I708a44d2d20f44e58d6ae0228a11e622e7648022
Reviewed-on: https://code.wireshark.org/review/27320
Reviewed-by: Guy Harris <guy@alum.mit.edu>
6 years agoQt: Add check for running toolbar reader thread
Stig Bjørlykke [Thu, 3 May 2018 19:44:21 +0000 (21:44 +0200)]
Qt: Add check for running toolbar reader thread

Check if the reader thread is running before calling requestInterruption()
in an attempt to avoid a crash when stop capture.

Change-Id: I07cdc19eb42413ce421f05186314fc34c33041e6
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27316
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agoTest: Fix default capture interface discovery.
Gerald Combs [Thu, 3 May 2018 19:06:52 +0000 (12:06 -0700)]
Test: Fix default capture interface discovery.

Change-Id: Id033a0e4e1e81ae9e84774b2d76f95049a2e2b3a
Reviewed-on: https://code.wireshark.org/review/27315
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
6 years agoQt: Fix toolbar signal on start capture
Stig Bjørlykke [Thu, 3 May 2018 12:49:24 +0000 (14:49 +0200)]
Qt: Fix toolbar signal on start capture

Always call toolbar->startCapture() when starting a capture even if
not having a list of interfaces. startCapture() will check for this.

Change-Id: Ifb654f403c72e1d687ae1f6471fc955aa4f6f23c
Ping-Bug: 14631
Reviewed-on: https://code.wireshark.org/review/27306
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
6 years agogitlab-ci: add gcc-8 and use it for nopcap build.
Dario Lombardo [Thu, 3 May 2018 10:46:06 +0000 (12:46 +0200)]
gitlab-ci: add gcc-8 and use it for nopcap build.

Change-Id: If7c17202f45ea0832596d5a87154b9ea333a5296
Reviewed-on: https://code.wireshark.org/review/27303
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotools: add missing optional packages in debian/rpm setup.
Dario Lombardo [Thu, 3 May 2018 12:54:17 +0000 (14:54 +0200)]
tools: add missing optional packages in debian/rpm setup.

Change-Id: Ie84f8d6e9ebdff0b760bc71ec227358ce23f427d
Reviewed-on: https://code.wireshark.org/review/27307
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agotools: add ninja to debian/rpm additional packages.
Dario Lombardo [Thu, 3 May 2018 10:51:45 +0000 (12:51 +0200)]
tools: add ninja to debian/rpm additional packages.

Change-Id: I56c1af8a5a4bdd4f9c2276a6e246a1b76a003049
Reviewed-on: https://code.wireshark.org/review/27302
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
6 years agoQt: Set margins in createEditor layout
Stig Bjørlykke [Thu, 3 May 2018 12:44:49 +0000 (14:44 +0200)]
Qt: Set margins in createEditor layout

Try to align the QComboBox with the other elements.

Change-Id: I63acdc2eb463e8806edffe27d67423dc37d161e5
Reviewed-on: https://code.wireshark.org/review/27305
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Reviewed-by: Roland Knall <rknall@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoSDP: do not assume that media_desc pointer is always set
Pascal Quantin [Thu, 3 May 2018 12:20:26 +0000 (14:20 +0200)]
SDP: do not assume that media_desc pointer is always set

Bug: 14648
Change-Id: I9d585a1b49e15529b19414be52c8bf198475fd62
Reviewed-on: https://code.wireshark.org/review/27304
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agomake-version.pl: Make the SVN output more similar to the git one.
AndersBroman [Thu, 3 May 2018 09:01:10 +0000 (11:01 +0200)]
make-version.pl: Make the SVN output more similar to the git one.

Change-Id: I37930178e52ea0b319b62d3ab1f56f6b0d5aadea
Reviewed-on: https://code.wireshark.org/review/27301
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Joakim Karlsson <oakimk@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agomac-nr: 15.1.0 changes to RAR PDU
Martin Mathieson [Wed, 2 May 2018 20:41:26 +0000 (21:41 +0100)]
mac-nr: 15.1.0 changes to RAR PDU

Change-Id: I0442831b13ecf276d4235230a6a9aa0788e91d3f
Reviewed-on: https://code.wireshark.org/review/27282
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
6 years agopfcp: correction of length
Joakim Karlsson [Thu, 3 May 2018 07:56:08 +0000 (09:56 +0200)]
pfcp: correction of length

flags are uint8 but the whole list was set as uint16

Change-Id: Ie52d621d35b68897919d5451c93b6c82e1d45649
Reviewed-on: https://code.wireshark.org/review/27300
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoextcap_parser.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:39:01 +0000 (18:39 +0200)]
extcap_parser.c: fix compilation with gcc 8

extcap_parser.c:291:23: error: cast between incompatible function types from ‘void (*)(extcap_arg *)’ {aka ‘void (*)(struct _extcap_arg *)’} to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: I7a03bdffa655ffb3a0160f205ddcb9943a52564c
Reviewed-on: https://code.wireshark.org/review/27266
Reviewed-by: Anders Broman <a.broman58@gmail.com>
6 years agoprefs.c: fix compilation with gcc 8
Pascal Quantin [Wed, 2 May 2018 16:34:00 +0000 (18:34 +0200)]
prefs.c: fix compilation with gcc 8

error: cast between incompatible function types from ‘void (*)(void *)’ to ‘void (*)(void *, void *)’ [-Werror=cast-function-type]

Change-Id: Id9f791c78e45d2373c3c1ce57059ef1e973a2fb1
hange-Id: I25597a730efcd580a1dd327d4fc38ab940a8b4d8
Reviewed-on: https://code.wireshark.org/review/27263
Reviewed-by: Anders Broman <a.broman58@gmail.com>