Remove a dead increment while we are at it
Change-Id: I4a453bbd959e71ff6e85be06d079176abdc33a95
Reviewed-on: https://code.wireshark.org/review/7622
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Fixes a potential infinite loop reported by Vlad Tsyrklevich found via the
"joern" tool. I'm pretty sure the semantics of proto_tree_add_item would have
prevented this, but not 100% and making it explicit doesn't hurt.
Bug: 11037
Change-Id: I92049a95d23ca9c233b3fd830637e6bca19a7434
Reviewed-on: https://code.wireshark.org/review/7592
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
We need to use rrc, as the checksum is likely to be
rotated before the plaintext payload.
For now we only handle the two common cases
rrc == 0 and rrc == ec...
Ping-Bug: 9398
Change-Id: I548f2f0650716294b6aeb361021be6e44ae8f1b3
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/7271
Reviewed-by: Michael Mann <mmann78@netscape.net>
Ping-Bug: 9398
Change-Id: I163d3dc99562b3388470c58d05e2d4d2e2f6d00c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-on: https://code.wireshark.org/review/7477
Reviewed-by: Michael Mann <mmann78@netscape.net>
Took the original patch from bug 5116 and made the dissector "human readable".
Bug: 5116
Change-Id: Ic5cc35f919865bc84ee8a3d0589f498ef13e8f6f
Signed-off-by: Michael Mann <mmann78@netscape.net>
Signed-off-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7605
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Don't dereference a null pointer. Remove g_assert()s copied from ui/gtk.
This fixes problems mentioned in bug 11044 but not the bug itself.
Change-Id: Iab75ab5cc6a184c8145a094b1c529a634e3c1c0d
Ping-Bug: 11044
Reviewed-on: https://code.wireshark.org/review/7610
Reviewed-by: Gerald Combs <gerald@wireshark.org>
documentation on the MS website and a capture I have.
Still have to dissect FSCTL_GET_INTEGRITY_INFORMATION.
Change-Id: I17ada4daa479810d8d8512c7e7b8798bcb650081
Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-on: https://code.wireshark.org/review/7587
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Change-Id: Ic4a3750a55523a5cf8ea72002055ffea1f081dd1
Reviewed-on: https://code.wireshark.org/review/7565
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
proto.c:8733:1: warning: no previous prototype for 'proto_tree_add_uint64_bits_format_value' [-Wmissing-prototypes]
proto.c:8812:1: warning: no previous prototype for 'proto_tree_add_int64_bits_format_value' [-Wmissing-prototypes]
proto.c:8861:1: warning: no previous prototype for 'proto_tree_add_boolean_bits_format_value64' [-Wmissing-prototypes]
Change-Id: Ic40ca6f32739b415a423fc978e8677d669a95867
Reviewed-on: https://code.wireshark.org/review/7509
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
When a different packet is changed, the packet scoped memory for tvbuff
is freed before clearing data source tabs. This results in
heap-use-after free when resizeEvent is called as a result of clearing
tabs for data sources.
Avoid resize events by hiding the tabs.
Caught with ASAN:
==18816==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060004cd970 at pc 0x7fffebf46618 bp 0x7fffffffbb10 sp 0x7fffffffbb00
READ of size 4 at 0x6060004cd970 thread T0
#0 0x7fffebf46617 in tvb_captured_length epan/tvbuff.c:423
#1 0x773062 in ByteViewText::updateScrollbars() ui/qt/byte_view_text.cpp:489
#2 0x76f307 in ByteViewText::resizeEvent(QResizeEvent*) ui/qt/byte_view_text.cpp:197
...
#24 0x9f2348 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
#25 0x9f23f5 in ByteViewText::~ByteViewText() ui/qt/byte_view_text.h:46
#26 0x76b9d6 in ByteViewTab::clear() ui/qt/byte_view_tab.cpp:54
#27 0x5de685 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:477
...
freed by thread T0 here:
...
#5 0x53d763 in cf_select_packet file.c:3827
#6 0x5ddfa5 in PacketList::selectionChanged(QItemSelection const&, QItemSelection const&) ui/qt/packet_list.cpp:454
#7 0x7fffe58ec980 (/usr/lib/libQt5Widgets.so.5+0x3bc980)
#8 0x7fffe4d55dd6 in QItemSelectionModel::selectionChanged(QItemSelection const&, QItemSelection const&) (/usr/lib/libQt5Core.so.5+0x23fdd6)
...
Change-Id: I9c1c01398713389de58259d13ebbaddd2d6e5c52
Reviewed-on: https://code.wireshark.org/review/7589
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Fixes error reported by UBSan:
ui/qt/packet_list.cpp:537:13: runtime error: load of value 190, which is not a valid value for type 'bool'
The method is apparently called earlier for other timers, resulting in
an error on startup. Initialize rows_inserted_ to avoid warnings when
the event is triggered later.
Change-Id: Iad919d79264ff1c3c17c9458c869d584234fcd5d
Reviewed-on: https://code.wireshark.org/review/7575
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
We currently load the expert indicator resources using an <img> tag.
According to QTBUG-36383 the @2x versions won't load unless you've built
with Qt 5.4.0 or later.
Change-Id: I003fd5d5f10e779f2e7ca6ba9fbb8e033df85b80
Reviewed-on: https://code.wireshark.org/review/7601
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This reverts commit 7d01a84d0e.
cmake doesn't get the dependencies right if the .qm files are gone
I'll work on this off-line and resubmit it as one commit rather than
trying to approach this step-by-step
Change-Id: Ibbd60163f910adbd571b3df2a980d64dbf1ea924
Reviewed-on: https://code.wireshark.org/review/7596
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
create the .qm files from the .ts files at compile time
for now, this works for autotools only
don't fail if Qt's lrelease tool is not available,
skip building the .qm files in this case
Change-Id: I869a6dc8220eb03e7ffc8bfdb2b6f3930f6cac72
Reviewed-on: https://code.wireshark.org/review/7460
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
It allows to get rid of the following error when compiling with gcc 4.7.2:
variable 'plen' might be clobbered by 'longjmp' or 'vfork' [-Werror=clobbered]
Change-Id: I1a647a6de7ddd25136b76237914ee7c5a8c7fa0a
Reviewed-on: https://code.wireshark.org/review/7580
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
Also add the ability to use "Decode As" function
Change-Id: I8be0ecd1d5d6b86d4aa9d69907e9216791be2ae0
Reviewed-on: https://code.wireshark.org/review/7577
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
http://doc.qt.io/qt-5/qwidget.html#updatesEnabled-prop says:
"Re-enabling updates implicitly calls update() on the widget."
This results in an infinite paintEvent series, hogging the CPU. Updating
the text twice does not seem to be a bad idea after all...
Change-Id: Id6cd733e68512f6963fc7d70d91859ca88ab8d38
Reviewed-on: https://code.wireshark.org/review/7581
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Maybe the test wrapper should be a Python script.
Change-Id: I38a5089c83ef643fb6c7c76acd599cef6aba39f4
Reviewed-on: https://code.wireshark.org/review/7572
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Create a wrapper script that cd's to the test directory and execs
test.sh. We need to handle build configurations so the path is a bit
roundabout.
Change-Id: I4c2a48c041bce2479422830110b1251b3f2c5a94
Reviewed-on: https://code.wireshark.org/review/7570
Reviewed-by: Gerald Combs <gerald@wireshark.org>
If packet_list_moveto_end does anything it should scroll, not select. Make
it a no-op for the time being.
Change-Id: I149815c8f9e50e95a4a77b91b7582c44eed6db4b
Ping-Bug: 10601
Reviewed-on: https://code.wireshark.org/review/7564
Reviewed-by: Gerald Combs <gerald@wireshark.org>
There were two bugs in the handling of all-joyn struct signatures:
- we were advancing the pointer without decrementing the length remaining
- we were not checking for the string's null-terminator (which is only
necessary if the string is malformed, but that's entirely possible)
Bug: 11028
Change-Id: I38b98cf3f43681f709846e3cb9068d20c4fdce82
Reviewed-on: https://code.wireshark.org/review/7552
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Change-Id: Ic288c429b69b858be77a9de1c571cc65a6e49b81
Reviewed-on: https://code.wireshark.org/review/7520
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Use feature for visual tracking request/response on Packet List.
Change-Id: Iabe2ddf46425ebd586ec462140b3f7d8f7ebbf56
Reviewed-on: https://code.wireshark.org/review/7525
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Originally suggested by Bill Meier for the MQTT protocol[1], but the
Websocket protocol can also benefit from this. Since
DESEGMENT_ONE_MORE_SEGMENT is a valid packet length, use the zero length
instead as an indicator that the length is not yet known.
Updated documentation too and remove the function documentation from
packet-tcp.c since it is duplicated in packet-tcp.h.
A noteworthy WSDG change is that the get_pdu_len parameter of
tcp_dissect_pdus gained another void pointer since
v1.99.2rc0-890-gceb8d95 ("Lua: Expose tcp_dissect_pdus() to Lua").
[1]: https://www.wireshark.org/lists/wireshark-dev/201405/msg00044.html
Change-Id: I4eba380e00cd757635eb5639c2857356dae3171e
Reviewed-on: https://code.wireshark.org/review/7279
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>