Commit Graph

50601 Commits

Author SHA1 Message Date
Pascal Quantin b4020a83d1 From Michael Lum via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9550 :
GSM SMS UDH EMS control expects 4 octets instead of 3 with OPTIONAL 4th

svn path=/trunk/; revision=53940
2013-12-11 18:47:15 +00:00
Chris Maynard 95b25a44cc Remove _U_ from dissect_openwire_tcp()'s data parameter; technically it is used since it is passed to tcp_dissect_pdus(), even though dissect_openwire() doesn't actually use it.
svn path=/trunk/; revision=53939
2013-12-11 17:08:23 +00:00
Chris Maynard 4c19d29b7c Improve tshark command-line error help. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9548 and adds addtional help, better formatting, sorting and some minimal documentation of the -u option to the tshark man page.
svn path=/trunk/; revision=53938
2013-12-11 16:52:40 +00:00
Chris Maynard 1bd68e7adb Trivial: Fix typo.
svn path=/trunk/; revision=53937
2013-12-11 15:20:29 +00:00
Alexis La Goutte 8617423f84 Update .gitignore
wireshark-tap-register* is used by gtk and Qt

svn path=/trunk/; revision=53936
2013-12-11 13:14:08 +00:00
Alexis La Goutte 16f85131bd Fix (-W)unused-const-variable error found by Clang
svn path=/trunk/; revision=53935
2013-12-11 13:14:00 +00:00
Pascal Quantin 3b59a3b692 Fix an out of bounds access found by ASAN and reported by Alexis:
==21553==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7fffbc0b2a5e at pc 0x7fe8684147a3 bp 0x7fffbc0b2950 sp 0x7fffbc0b2948
READ of size 2 at 0x7fffbc0b2a5e thread T0
    #0 0x7fe8684147a2 in dissect_schedule_message /home/alagoutte/wireshark-clang/epan/dissectors/packet-gsm_cbch.c:309
    #1 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #2 0x7fe867eda42c in call_dissector_only /home/alagoutte/wireshark-clang/epan/packet.c:2139
    #3 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #4 0x7fe867ed735b in dissector_try_uint_new /home/alagoutte/wireshark-clang/epan/packet.c:1030
    #5 0x7fe868a3ebd4 in decode_udp_ports /home/alagoutte/wireshark-clang/epan/dissectors/packet-udp.c:411
    #6 0x7fe868a41886 in dissect /home/alagoutte/wireshark-clang/epan/dissectors/packet-udp.c:747
    #7 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #8 0x7fe867ed6d03 in dissector_try_uint_new /home/alagoutte/wireshark-clang/epan/packet.c:1030
    #9 0x7fe8684eaa1f in dissect_ip /home/alagoutte/wireshark-clang/epan/dissectors/packet-ip.c:2401
    #10 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #11 0x7fe867ed735b in dissector_try_uint_new /home/alagoutte/wireshark-clang/epan/packet.c:1030
    #12 0x7fe868333e98 in dissect_ethertype /home/alagoutte/wireshark-clang/epan/dissectors/packet-ethertype.c:305
    #13 0x7fe867ed707d in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:508
    #14 0x7fe867eda42c in call_dissector_only /home/alagoutte/wireshark-clang/epan/packet.c:2139
    #15 0x7fe8683328ad in dissect_eth_common /home/alagoutte/wireshark-clang/epan/dissectors/packet-eth.c:472
    #16 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #17 0x7fe867ed735b in dissector_try_uint_new /home/alagoutte/wireshark-clang/epan/packet.c:1030
    #18 0x7fe868382460 in dissect_frame /home/alagoutte/wireshark-clang/epan/dissectors/packet-frame.c:485
    #19 0x7fe867ed70a9 in call_dissector_through_handle /home/alagoutte/wireshark-clang/epan/packet.c:512
    #20 0x7fe867eda42c in call_dissector_only /home/alagoutte/wireshark-clang/epan/packet.c:2139
    #21 0x7fe867ed5baf in call_dissector /home/alagoutte/wireshark-clang/epan/packet.c:2169
    #22 0x7fe867eb6388 in epan_dissect_run_with_taps /home/alagoutte/wireshark-clang/epan/epan.c:329
    #23 0x4a0ef9 in process_packet /home/alagoutte/wireshark-clang/tshark.c:3434
    #24 0x49c985 in load_cap_file /home/alagoutte/wireshark-clang/tshark.c:3237
    #25 0x7fe860e8ede4 in __libc_start_main /build/buildd/eglibc-2.17/csu/libc-start.c:260
    #26 0x48586c in _start ??:?

Address 0x7fffbc0b2a5e is located in stack of thread T0 at offset 126 in frame
    #0 0x7fe86841353f in dissect_cbch /home/alagoutte/wireshark-clang/epan/dissectors/packet-gsm_cbch.c:345

  This frame has 2 object(s):
    [32, 80) 'new_slots.i'
    [128, 224) 'other_slots.i' <== Memory access at offset 126 underflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism or swapcontext
      (longjmp and C++ exceptions *are* supported)
SUMMARY: AddressSanitizer: stack-buffer-overflow ??:0 ??


svn path=/trunk/; revision=53934
2013-12-11 12:54:10 +00:00
Martin Mathieson c25611b9e7 Remove an unused variable
svn path=/trunk/; revision=53933
2013-12-11 11:15:35 +00:00
Martin Mathieson c72fa5eb95 Convert to new-style dissector, change crcStatusValid to a gboolean, and rework DRX timers (again)
svn path=/trunk/; revision=53932
2013-12-11 11:03:29 +00:00
Anders Broman 453f98cb72 #if 0 unused function.
svn path=/trunk/; revision=53931
2013-12-11 06:29:17 +00:00
Anders Broman 07c5bb3480 - Forward declaration of register functions.
svn path=/trunk/; revision=53930
2013-12-11 06:10:45 +00:00
Evan Huus a155364c77 Pass the correct uuid when recursing (the other one is a temporary var that may
not be initialized).

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9535

svn path=/trunk/; revision=53929
2013-12-10 23:23:26 +00:00
Gerald Combs 3889cfc91b From Deon van der Westhuysen via bug 9537:
----
The qt version of wireshark (stats_tree_dialog.cpp) by default expands
all nodes within a stats_tree (see for example the "Statistics" > "IP
Statistics" > "IP Destinations" stats_tree; you need this patch
installed before the item is added to the stats menu:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9528). This
behaviour is fine for small trees but becomes counter productive in
trees with many items or levels.

This patch changes the qt ui to act like the gtk ui: the first level of
nodes are expanded by default while deeper levels are collapsed.
----

From me: "Expand all" makes sense for a small number of items. Do so if
we have less than 100.

svn path=/trunk/; revision=53928
2013-12-10 22:38:35 +00:00
Martin Kaiser 20c7414c71 use large positve values for illegal DVB-SI string encodings
interpret encoding fields as UINT32 so that the displayed value matches
the actual bytes in the packet

svn path=/trunk/; revision=53927
2013-12-10 22:08:07 +00:00
Chris Maynard 67912bf798 Trivial: The file name is prefs_capture.c, not capture_prefs.c
svn path=/trunk/; revision=53926
2013-12-10 22:06:22 +00:00
Martin Kaiser c856b1b11d use the new SI string routines in DVB-CI
svn path=/trunk/; revision=53925
2013-12-10 22:05:54 +00:00
Chris Maynard 3ec7cbf4d0 Reject the packet if data is NULL.
svn path=/trunk/; revision=53924
2013-12-10 22:04:30 +00:00
Chris Maynard 90f5deac44 Where appropriate, reject the packet entirely or at least protect against data being NULL.
svn path=/trunk/; revision=53923
2013-12-10 22:04:00 +00:00
Chris Maynard a57b528c87 Reject packets if data (and usb_trans_info) are NULL. Also, new-syle dissectors return the number of bytes dissected, not TRUE/FALSE.
svn path=/trunk/; revision=53922
2013-12-10 22:01:55 +00:00
Chris Maynard 1032078728 Trival: spaces -> tab.
svn path=/trunk/; revision=53921
2013-12-10 21:56:48 +00:00
Gerald Combs c8c5ea1647 QComboBox::setCurrentText() exits in Qt3 and Qt5 but not Qt4.
svn path=/trunk/; revision=53920
2013-12-10 21:44:12 +00:00
Gerald Combs ed80d7a807 Add a missing semicolon.
svn path=/trunk/; revision=53919
2013-12-10 21:43:14 +00:00
Anders Broman 440a1809cc - Forward declaration of register functions.
svn path=/trunk/; revision=53918
2013-12-10 21:30:13 +00:00
Gerald Combs 7b4b912fb7 Fix prototypes.
svn path=/trunk/; revision=53917
2013-12-10 21:27:09 +00:00
Chris Maynard 4cd6759755 Remove _U_ from dissect_usb_com_bulk()'s data parameter; it is used.
svn path=/trunk/; revision=53916
2013-12-10 21:12:52 +00:00
Gerald Combs 1c9b5dfad3 Add "Decode As" to the packet list and protocol tree context menus.
Automatically add a new item if "Decode As" is triggered from the
context menus.

svn path=/trunk/; revision=53915
2013-12-10 21:07:26 +00:00
Chris Maynard b007fccec3 Reject the packet if data is NULL.
svn path=/trunk/; revision=53914
2013-12-10 20:49:11 +00:00
Gerald Combs 5be6dd5feb Remove config.h includes from proto.h and tap.h.
svn path=/trunk/; revision=53913
2013-12-10 20:23:33 +00:00
Gerald Combs 61461ccc6c Fix compilation on Windows.
svn path=/trunk/; revision=53912
2013-12-10 20:00:02 +00:00
Anders Broman 9bdd3bbde1 - Forward declaration of register functions.
svn path=/trunk/; revision=53911
2013-12-10 19:50:20 +00:00
Gerald Combs 17a67c3b5c Get the "Decode As" dialog working, albeit with a few warts. It differs
from the GTK flavor in two major ways:

- The "Decode As" and "User Specified Decodes" dialog have been unified.
- You can modify the decode as behavior at any time, not just when you
  have a packet selected.

Revert part of 53498 so that we can move items marked

/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/

from epan/decode_as.h to ui/decode_as_utils.h. 

Move "save" code from decode_as_dlg.c to decode_as_utils.c as well.

In packet-dcerpc.c don't register a table named "ethertype". We might
want to add checks for duplicate table names.

To do:
- Add support for ranges?
- Either add support for DCERPC or make DCERPC use a regular dissector
  table.
- Fix string selectors (i.e. BER).


svn path=/trunk/; revision=53910
2013-12-10 19:23:26 +00:00
Jakub Zawadzki 5fa7d37e37 Fix epan building with undefined HAVE_PLUGINS
+ guard prototypes with HAVE_PLUGINS in .h files to get errors before linking.

svn path=/trunk/; revision=53909
2013-12-10 19:13:09 +00:00
Anders Broman 25ce6c262e - Forward declaration of register functions.
svn path=/trunk/; revision=53908
2013-12-10 17:41:57 +00:00
Irene Rüngeler 706c629ae0 Add uat preferences to SCTP (QT only).
svn path=/trunk/; revision=53907
2013-12-10 15:39:16 +00:00
Irene Rüngeler 85d84776b8 Use PT_TXTMOD_NONE for columns that should not be editable.
svn path=/trunk/; revision=53906
2013-12-10 15:33:07 +00:00
Chris Maynard 939e04e74b In dissect_ldss_transfer(), reject the packet if data is NULL. Fix some typos.
svn path=/trunk/; revision=53905
2013-12-10 15:31:29 +00:00
Irene Rüngeler 7eb15db51c Do not show uat preferences if not registered for the gui.
svn path=/trunk/; revision=53904
2013-12-10 15:29:43 +00:00
Stig Bjørlykke 0d31c840ae Removed debug output.
svn path=/trunk/; revision=53903
2013-12-10 14:43:15 +00:00
Martin Kaiser ff42551d71 comment out unused functions
fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9538
reported by Yaniv Kaul

svn path=/trunk/; revision=53902
2013-12-10 10:52:29 +00:00
Anders Broman acf2fed688 - Forward declaration of register functions.
svn path=/trunk/; revision=53901
2013-12-10 06:01:16 +00:00
Chris Maynard af4cbd00a0 Remove _U_ from dissect_wol's and dissect_wolheur's data argument; they both pass it to dissect_wol_pdu, which doesn't actually use it, but technically they do.
svn path=/trunk/; revision=53900
2013-12-10 03:56:51 +00:00
Chris Maynard 6e37321042 Reject the packet if data is NULL.
svn path=/trunk/; revision=53899
2013-12-10 03:33:50 +00:00
Chris Maynard c5e358116c Reject the packet if data is NULL.
svn path=/trunk/; revision=53898
2013-12-10 03:25:04 +00:00
Chris Maynard ca174aedf2 Remove _U_ from dissect_carp's data argument; it's passed to test_carp_packet(), which doesn't actually use it, but dissect_carp technically does.
svn path=/trunk/; revision=53897
2013-12-10 03:11:34 +00:00
Chris Maynard babc735c3a Reject the packet if data is NULL. For now, leave the DISSECTOR_ASSERT(rose_ctx_tmp) since get_rose_ctx() also checks the signature, which might be invalid even if data is not NULL.
svn path=/trunk/; revision=53896
2013-12-09 22:38:42 +00:00
Chris Maynard 79fa0d0a3f Reject the packet if data is NULL without doing anything else.
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors.  Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT().

svn path=/trunk/; revision=53895
2013-12-09 22:23:44 +00:00
Chris Maynard e3c369eb67 Minor whitespace changes and to keep the GNU-syle indentation scheme consistent.
svn path=/trunk/; revision=53894
2013-12-09 21:33:54 +00:00
Chris Maynard aba06b568d Reject the packet if data is NULL.
svn path=/trunk/; revision=53893
2013-12-09 21:20:52 +00:00
Martin Kaiser b369351d2f ignore empty texts
svn path=/trunk/; revision=53892
2013-12-09 21:14:45 +00:00
Martin Kaiser 17cb36a233 use the DVB-SI string hadling for the short event descriptor
svn path=/trunk/; revision=53891
2013-12-09 21:06:58 +00:00