aboutsummaryrefslogtreecommitdiffstats
path: root/ui
AgeCommit message (Collapse)AuthorFilesLines
2018-10-01Qt: Set enabled properties in Filter DialogStig Bjørlykke1-0/+6
Default set enabled property to false for deleteToolButton and copyToolButton because no item is selected. Change-Id: I99bfb572abb9bc38cbf49c6b1fabdeefac4f8d90 Reviewed-on: https://code.wireshark.org/review/29951 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-10-01Qt: Set enabled properties in Coloring Rules DialogStig Bjørlykke1-0/+6
Default set enabled property to false for deleteToolButton and copyToolButton because no item is selected. Change-Id: I6ead2fa17cf1fd5bc165526fb76d104af6d5234d Reviewed-on: https://code.wireshark.org/review/29949 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-30Qt/FrameInformation: read packet record in private bufferPeter Wu2-12/+9
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. Change-Id: I6d689440e0cc13ef522e874fd8e5795a97a6aca7 Reviewed-on: https://code.wireshark.org/review/29922 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-30Qt/PacketList: read packet record in private bufferPeter Wu1-4/+13
To prevent potential interference with other users of the capture file, read data in a private buffer instead of reusing the one from capFile. An accidental (?) change in commit v2.9.0rc0-2001-g123bcb0362 resulted in "cf_read_record" reallocating the capture_file->buf buffer. That issue combined with the current behavior would result in a crash when ignoring a packet followed by two times opening a context menu: ==32187==ERROR: AddressSanitizer: heap-use-after-free on address 0x7fda91642800 at pc 0x55a98f3faaa7 bp 0x7fffa2807860 sp 0x7fffa2807858 READ of size 1 at 0x7fda91642800 thread T0 #0 0x55a98f3faaa6 in QByteArray::operator[](int) const /usr/include/qt/QtCore/qbytearray.h:476:47 #1 0x55a9901006eb in ByteViewText::drawLine(QPainter*, int, int) ui/qt/widgets/byte_view_text.cpp:370:35 #2 0x55a9900fd109 in ByteViewText::paintEvent(QPaintEvent*) ui/qt/widgets/byte_view_text.cpp:217:9 ... #50 0x55a98e9fd32a in PacketList::contextMenuEvent(QContextMenuEvent*) ui/qt/packet_list.cpp:614:15 ... 0x7fda91642800 is located 0 bytes inside of 3038371-byte region [0x7fda91642800,0x7fda919284a3) freed by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98ea0b725 in PacketList::getFilterFromRowAndColumn() ui/qt/packet_list.cpp:1041:14 #9 0x55a98e94e4a1 in MainWindow::setMenusForSelectedPacket() ui/qt/main_window_slots.cpp:1175:39 previously allocated by thread T0 here: #0 0x55a98e65fd99 in __interceptor_realloc (run/wireshark+0x1019d99) #1 0x7fdac6e1bb88 in g_realloc /build/src/glib/glib/gmem.c:164 #2 0x7fdaac12c908 in wtap_read_packet_bytes wiretap/wtap.c:1368:2 #3 0x7fdaabf01e5a in libpcap_read_packet wiretap/libpcap.c:789:7 #4 0x7fdaabef887d in libpcap_seek_read wiretap/libpcap.c:690:7 #5 0x7fdaac12d5f5 in wtap_seek_read wiretap/wtap.c:1431:7 #6 0x55a98e6c8611 in cf_read_record_r file.c:1566:8 #7 0x55a98e6c88c5 in cf_read_record file.c:1576:10 #8 0x55a98e6e0bde in cf_select_packet file.c:3777:8 #9 0x55a98e9ea2ff in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:420:9 This should be fixed now by I4f1264a406a28c79491dcd77c552193bf3cdf62d, but let's avoid the shared buffer. It's not exactly a hot code path anyway. Change-Id: I548d7293a822601f4eb882672477540f066a066b Reviewed-on: https://code.wireshark.org/review/29921 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-30[Automatic update for 2018-09-30]Gerald Combs7-253/+177
Update manuf, services enterprise numbers, translations, and other items. Change-Id: Ic15ad719f659fe7365c9e652af18507a5d050e6b Reviewed-on: https://code.wireshark.org/review/29932 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-30Fix comment.Guy Harris1-1/+1
Change-Id: I0517424a19d31a6df50c843689e97600f0bb5a0e Reviewed-on: https://code.wireshark.org/review/29931 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Clean up the epan_dissect_t in the normal code path.Guy Harris1-0/+2
We initialized it, but only cleaned it up in an error code path, not in the regular code path. That could leak memory. Change-Id: Ic6689163ca58990fa5091b23e7ab2e0292eed76c Reviewed-on: https://code.wireshark.org/review/29930 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Clean up the epan_dissect_t in the normal code path.Guy Harris1-0/+2
We initialized it, but only cleaned it up in an error code path, not in the regular code path. That could leak memory. Change-Id: Icb5aa5b1a2df8919d8a4e54d88a5d865320bd279 Reviewed-on: https://code.wireshark.org/review/29929 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Qt/FrameInformation: do not use file-scoped memory for temporary dataPeter Wu1-9/+5
Let QByteArray own the memory instead of wmem to allow memory to be released earlier. Change-Id: Ibf6d1a56120d30daea76924b8006480854dcfbd3 Reviewed-on: https://code.wireshark.org/review/29923 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-29Qt: Show "unknown colorfilters" warning when opening the dialogStig Bjørlykke1-11/+11
Show the warning about unknown colorfilters being disabled when opening the "Coloring Rules..." dialog to make the user aware of this before starting editing the rules. The user may have corrected the filter and enabled it while having the dialog open, and then this warning would be misleading. Change-Id: Ic7f10495e5561bc2fea413c89cf9ebd187c8f113 Reviewed-on: https://code.wireshark.org/review/29909 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-29Get rid of some no-longer-supported GUI preferences.Guy Harris2-2/+0
Make them obsolete preferences; if they had any use, it was with the now-removed GTK+ UI. Change-Id: I2b514148c8066c5c79cb402493f47a21d3679819 Reviewed-on: https://code.wireshark.org/review/29912 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-29Get rid of the printing preferences.Guy Harris1-5/+0
They're no longer used by any of the printing code; mark them as obsolete. Change-Id: Iceaf14f48f1bd35757a9a158a5348f6202b90fc7 Reviewed-on: https://code.wireshark.org/review/29911 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-26prefs: Remove trailing dot from UI textStig Bjørlykke1-1/+1
Change-Id: I6eaef762a523260dce2a380257111721ddf48811 Reviewed-on: https://code.wireshark.org/review/29865 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-26prefs: add the option not to load interfaces on startup.Dario Lombardo4-2/+18
Change-Id: I2ade0647a8c32b76aebd60117b4317cd005aff91 Reviewed-on: https://code.wireshark.org/review/29854 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-26Qt: don't load the interfaces list if a capture file is used.Dario Lombardo1-1/+2
Bug: 15126 Change-Id: I4c190879541db94637ad88ffe99f10479caa4a43 Reviewed-on: https://code.wireshark.org/review/29549 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-25Rename packet-ssl* to packet-tls*Gerald Combs1-2/+2
Rename packet-ssl{,-utils}.[ch] to packet-tls{,-utils}.[ch]. Change-Id: I4732162ec131ddf0734b3dd191ccc9e48a76ce06 Reviewed-on: https://code.wireshark.org/review/29659 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>
2018-09-25Qt: Create directories if they should be openedRoland Knall1-2/+15
In the about dialog, create directories within the folders tab if the user wants them to open and they do not exist yet Change-Id: Ia95692dabef92392714c329c868abc78e3bcec6e Reviewed-on: https://code.wireshark.org/review/29782 Petri-Dish: Roland Knall <rknall@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Roland Knall <rknall@gmail.com>
2018-09-24Qt: Don't append a empty custom window titleStig Bjørlykke1-4/+8
The recently introduced %F in custom window title is empty when no capture file is loaded. Check for this to avoid having a trailing UTF8_EM_DASH or "[]" in the title. Change-Id: I5fb0832a2898501cb128bd52b22a4dc5f3ad4f4e Reviewed-on: https://code.wireshark.org/review/29800 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-23[Automatic update for 2018-09-23]Gerald Combs7-2090/+2687
Update manuf, services enterprise numbers, translations, and other items. Change-Id: I8a70ff9590e5adb3d0bdcd504b3f2886a314548c Reviewed-on: https://code.wireshark.org/review/29790 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-13Start renaming SSL to TLS.Gerald Combs9-27/+27
Rename the "ssl" protocol to "tls" and add an "ssl" alias. Prefer "TLS" over "SSL" in user interface text and in the documentation. Fix the test_tls_master_secret test while we're here. Bug: 14922 Change-Id: Iab6ba2c7c4c0f8f6dd0f6d5d90fac5e9486612f8 Reviewed-on: https://code.wireshark.org/review/29649 Petri-Dish: Gerald Combs <gerald@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-09-11Qt: Replace $HOME with ~ in window title %F variableStig Bjørlykke1-15/+30
Replace $HOME with ~ in window title %F variable. Optimize code to check if variable is used before doing replacement. Change-Id: I95ef8505e50379d98fdb1661e09394d1ded7ecca Reviewed-on: https://code.wireshark.org/review/29597 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10Qt: Add some window title variablesStig Bjørlykke1-2/+22
Add some new variables to be used in custom window title. %F = file path of the capture file %S = a conditional separator (" - ") that only shows when surrounded by variables with values or static text Change-Id: I20a60a3018cc86236f4991030eadb7f51681cc32 Reviewed-on: https://code.wireshark.org/review/29534 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10prefs,ui: properly migrate old filter expressionsPeter Wu4-16/+27
When legacy filter expressions preferences are present, be sure to (1) save the dfilter_buttons file when updating the preferences file and (2) save the preferences file after updating the dfilter_buttons file. Without doing (1), the old buttons will be lost. Without (2), restarting Wireshark will result in duplicate buttons. Only write the files if the user actually made other changes to avoid breaking profiles by just opening Wireshark. Bug: 15114 Bug: 15121 Change-Id: I5b9417c34146c4450526781a20308c9c98fb44a1 Reviewed-on: https://code.wireshark.org/review/29488 Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-09-10Qt: Restore column visibility when loading packetsStig Bjørlykke1-6/+8
Always restore column visibility when loading packets to avoid some situations where the column hidden state was incorrect. This fixes the following scenario: - Apply a column and hide it using the column popup menu - Apply another column and remove it using the column popup menu - Close and reopen the capture file - Observe the hidden column is shown, but with wrong width Change-Id: I00531907b2383c6605a2d62e8243092906037d0c Reviewed-on: https://code.wireshark.org/review/29516 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-10Avoid warnings about a format string being a variable.Guy Harris1-2/+6
This also avoids issues if this isn't called in packet scope. Change-Id: I7dbf5b49c9f7c1b442a1104156b004b339076c26 Reviewed-on: https://code.wireshark.org/review/29527 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-09Remove the tshark -z compare featureJoão Valverde2-607/+0
- It cannot support IPv6. - Non-standard use (specifically recommended against in the RFCs) of the IPv4 fragment ID field. - Has a narrow and non-obvious use case, IMO. - It is not supported in the Qt GUI. - Significant maintenance burden for an obscure feature. Change-Id: Icaf429269dc42f78c38b8d20001508132499faf8 Reviewed-on: https://code.wireshark.org/review/29239 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-09-09Attempt to squelch a narrowing warning.Guy Harris1-1/+1
Some older versions of Clang appear to think dividing a float by a 64-bit integer is narrowing 64 bits to 32 bits. Change-Id: Ie3148ee6d5d5d0810d01e7d985b8e4320dacf565 Reviewed-on: https://code.wireshark.org/review/29518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-09-09epan: Add argument to epan_init() to disable pluginsJoão Valverde1-1/+1
Change-Id: I8dc76e6bf8c4d5a3081cbdc1d47b88e857415d29 Reviewed-on: https://code.wireshark.org/review/29498 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-09-08Add Start-End timestamp columns to the RTP Streams report from tsharkMihai Codrean1-2/+4
Change-Id: Iafc2818a4a767643e154a1a7a3ff7bc6d7f0f12b Reviewed-on: https://code.wireshark.org/review/29462 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-07Qt: Add null check for finfo and hfinfoMartin Boye Petersen2-3/+4
Adding the null check fixes a bug that made wireshark crash when right clicking a subtree which doesn't have any preferences and if none of the parents had one either. The problem was introduced in commit 589413d8772f1450be9bd4a2550cb99a95f71299 Change-Id: Ia5bbae0a58298f3e9d912e44f33589da1cbfacc9 Reviewed-on: https://code.wireshark.org/review/29455 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-05epan: Guard g_base64_decode_inplace() against zero length stringStig Bjørlykke1-2/+4
The g_base64_decode_inplace() does not handle zero length string so add a guard for this before calling. Bug: 15113 Change-Id: I89fa17dd62af238f4282835c317e5c8be6e0c8a1 Reviewed-on: https://code.wireshark.org/review/29428 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-03epan: Use g_base64_decode_inplace()Stig Bjørlykke1-3/+3
Replace ws_base64_decode_inplace() with g_base64_decode_inplace() or g_base64_decode(), which was introduced in glib 2.12. The only observed difference is a need for zero-terminate the buffer after decoding. Change-Id: Ia102d0d8e9bec575ffeddf448191a3f6de9fb1ed Reviewed-on: https://code.wireshark.org/review/29382 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-02prefs: Remove prefs.gui_use_pref_saveStig Bjørlykke7-43/+17
This setting was only used in GTK. Change-Id: If184c61e4e081992e517f480b4faf129b81508c1 Reviewed-on: https://code.wireshark.org/review/29388 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-02Qt: Avoid crash for ByteViewTab with 0 bytesStig Bjørlykke1-1/+3
A ByteViewTab with 0 bytes is not useful, but may happen. The crash could be reproduced with the following Lua code: local t = ByteArray.new():tvb() Change-Id: I256fd7fc2b91aa3c1161c46558c647308a3d564b Reviewed-on: https://code.wireshark.org/review/29383 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-09-01Qt: Improve fetching preferences from the packet list.Stig Bjørlykke1-0/+1
The Lua fake item will not give preferences for the last protocol in the packet, so avoid this. The Lua fake item is always added when having a Lua post-dissector, even if the post-dissector does not add any elements to the tree. Change-Id: I43427bf522a32feebd44f192888e73b5607e6fff Reviewed-on: https://code.wireshark.org/review/29377 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-08-31Qt: Improve fetching preferences from a tree item.Stig Bjørlykke1-1/+7
The special-case "text only" header field will not give preferences for the selected protocol, so we have to traverse the parents to get a usable node. Change-Id: I647f275839db337dedaeb67664402af1fe9f21c1 Reviewed-on: https://code.wireshark.org/review/29363 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-31Add support for protocol aliases. Switch BOOTP to DHCP.Gerald Combs1-1/+1
Add support for aliasing one protocol name to another and for filtering using aliased fields. Mark aliased fields as deprecated. Rename the BOOTP dissector to DHCP and alias "bootp" to "dhcp". This lets you use both "dhcp.type" and "bootp.type" as display filter fields without having to duplicate all 500+ DHCP/BOOTP fields. To do: - Add checks to proto.c:check_valid_filter_name_or_fail? - Transition SSL to TLS. - Rename packet-bootp.c to packet-dhcp.c? Change-Id: I29977859995e8347d80b8e83f1618db441b10279 Ping-Bug: 14922 Reviewed-on: https://code.wireshark.org/review/29327 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-08-29epan: Remove unnecessary all protocols registration callbackJoão Valverde2-3/+1
We are exporting a registration function from libwireshark just to have it passed back as a callback. Seems unnecessary. Change-Id: I7621005c9be11691d319102326824c5e3520a6f3 Reviewed-on: https://code.wireshark.org/review/29328 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot Reviewed-by: João Valverde <j@v6e.pt>
2018-08-23Qt: Enable select hint text in Show Packet BytesStig Bjørlykke1-0/+3
The hint label in Show Packet Bytes shows information about the selected field, and the user should be able to select this text using the mouse. Change-Id: Ic969dbd07cb1fcd61d0e8f777692523a0fc5850b Reviewed-on: https://code.wireshark.org/review/29259 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-08-22Qt: Enable "Resolve Names" for boolean without TFSStig Bjørlykke1-3/+2
Boolean field types will default to tfs_true_false if not having a TFS set, so this should always be enabled for resolve. Remove FT_FRAMENUM from this check because they will probably never have a TFS or VALS setting. Change-Id: I6295f8b7c9db7295eab1750e9c2cf0ee7382d43d Reviewed-on: https://code.wireshark.org/review/29218 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-21WSUG: Fixup the "Internals" section.Gerald Combs1-1/+1
The Internals menu items were moved under the View menu a while back. Fix an internals dialog title. Change-Id: I78d61bf4f52bf9eb86cf7ff59fc036b9f7e846f5 Reviewed-on: https://code.wireshark.org/review/29228 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Gerald Combs <gerald@wireshark.org>
2018-08-21Qt: Pop field status when closing a fileStig Bjørlykke1-0/+1
Ensure we remove the info status for a selected field when closing a capture file to bring the text back to "Ready to load or capture". Change-Id: I2946675b2c0bc47cb8c05c1d391ff8a0875e8c7f Reviewed-on: https://code.wireshark.org/review/29216 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-21Calculate RTP delta time even if clock rate is unknown.Johannes Singler1-0/+4
Change-Id: If61c3166774a25f2c22b68c1e06c372088cae575 Reviewed-on: https://code.wireshark.org/review/29199 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-20Qt: fix several crashes in the SCTP DialogsVasil Velichkov15-140/+173
Store the association id instead of a pointer to the volatile "sctp_assoc_info_t" structure because it gets freed after a rescan. Bug: 14970 Change-Id: Id8fe2dfe3549bd711fc8ddef0770b217e83c2088 Fixes: v1.11.3-rc1-604-g796bf409b0 ("Add dialogs and graphs to analyse SCTP behavior similar to the GTK version.") Reviewed-on: https://code.wireshark.org/review/28711 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-14export_pdu.c: Fix a memory leakVasil Velichkov1-1/+0
Allocate the exp_pdu_data using the wmem_packet_scope allocator so the epan_dissect_run_with_taps will free it after calling all registered tap listeners. valgrind --tool=memcheck --leak-check=full ./run/tshark -r sctp.pcap -U "OSI layer 3" -w exported.pcap 32 bytes in 1 blocks are definitely lost in loss record 48 of 76 at 0x4C2EBAB: malloc (vg_replace_malloc.c:299) by 0xB3FC3C5: g_malloc (gmem.c:99) by 0x68C2BE1: export_pdu_create_tags (exported_pdu.c:251) by 0x68C2D5E: export_pdu_create_common_tags (exported_pdu.c:231) by 0x70AA54E: create_exp_pdu_proto_name (packet-sctp.c:3240) by 0x70AA54E: export_sctp_data_chunk.part.23 (packet-sctp.c:3268) by 0x70AB76B: export_sctp_data_chunk (packet-sctp.c:3256) by 0x70AB76B: dissect_data_chunk (packet-sctp.c:3509) Change-Id: I6e247ab2861bbb053f0958faf253913b28dbcbeb Reviewed-on: https://code.wireshark.org/review/29126 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>
2018-08-13Put the interface descrptions into the IDB when capturing to pcapng.Guy Harris1-9/+13
capture_opts_add_iface_opt(), when called in a program acting as a capture child, will fetch the description for the interface, and will also generate a "display name" for the interface. In the process, we clean up capture_opts_add_iface_opt() a bit, combining duplicate code. We rename console_display_name to just display_name, as it may also be used in the title bar of Wireshark when capturing. Change-Id: Ifd18955bb3cb41df4c0ed4362d4854068c825b96 Reviewed-on: https://code.wireshark.org/review/29117 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-13Move get_iface_display_name() to ui/iface_lists.c.Guy Harris3-66/+56
It's only used there, so move it there. Change-Id: I68472150e020ba94166782e3e4c08cba94c0f9ee Reviewed-on: https://code.wireshark.org/review/29114 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12More interface view cleanups.Guy Harris5-18/+27
Rename some of the columns - IFTREE_COL_NAME is the interface name, IFTREE_COL_DESCRIPTION is the description/friendly name, and a new IFTREE_COL_DISPLAY_NAME column is the display name (which may include both the description and the interface name). Rename IFTREE_COL_INTERFACE_COMMENT to just IFTREE_COL_COMMENT - there's no *other* type of comment, and "IF" is short for "interface". In the interface frame, use IFTREE_COL_DISPLAY_NAME, as that's the only column that shows both and thus has something for all interfaces. In the "Manage interfaces" dialog, put the description before the interface name, as it was in earlier versions. Change-Id: If0d959dcd4ca99913c941df00621da3c478233f6 Reviewed-on: https://code.wireshark.org/review/29090 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-12Show just the description in the description column.Guy Harris1-1/+1
Don't show the display name, as that may include either the interface name, which is already in another column, or the column comment, which is also already in another column. Change-Id: I12f81d9e4579b82267062bb5e4e745925ed382b7 Reviewed-on: https://code.wireshark.org/review/29087 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-08-11Fix the "Manage interfaces" dialog columns.Guy Harris2-4/+2
Windows is not the only OS with "friendly" names for interfaces; macOS has them as well, and some *BSDs let you tag interfaces with names as well. The column headings for the "Interface Name" and the "Friendly Name" were backwards. Change-Id: I72543505cec9d479d8ab8aab3850daab3667805f Reviewed-on: https://code.wireshark.org/review/29082 Reviewed-by: Guy Harris <guy@alum.mit.edu>