Commit Graph

61911 Commits

Author SHA1 Message Date
Dario Lombardo 37acf433db wmem: add null-terminator support.
This change makes wmem_array more similar to GArray by adding
two functions that mimic the first two params of g_array_new().

Change-Id: Iaec999cd2e44f79f44d766be5d39741b73602e5a
Reviewed-on: https://code.wireshark.org/review/13989
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2016-02-22 19:55:33 +00:00
Pascal Quantin 1333235360 caputils: fix crash when calling 'dumpcap -i' without having WinPcap installed
Add a test on err_str buffer presence before trying to use it,
like what is done in other code paths.

Bug: 12143
Change-Id: I30ae49a33224dc190c202637767df9d7de2c0f2b
Reviewed-on: https://code.wireshark.org/review/14074
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-22 19:48:56 +00:00
Pascal Quantin 97de3b3cd7 LTE RRC: add a unit to gnss-TOD-msec field
Change-Id: I48b15d47d9bdf1bb4078a03ee7183f05bb57fa04
Reviewed-on: https://code.wireshark.org/review/14072
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-22 19:48:41 +00:00
Tatsuhiro Tsujikawa 3fe16e13b5 HTTP2: Reduce resource usage.
Cache decoded header fields in order to conserve memory.

If we try to decompress more than 256 KB or find 200 or more headers
stop decompressing and add an expert item. Note that we might want to
make the maximum values configurable via preferences.

Bug:12077
Change-Id: Idf7cb1046c96cf87e1b53af6c56e19b4abad1dfb
Reviewed-on: https://code.wireshark.org/review/13746
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-22 18:30:39 +00:00
Peter Membrey 614c7fb9f4 Cisco Marker: Fix endian type for some field
Fixed several decoded fields that were poorly described in the original documentation

Change-Id: I688c5fd7e011d0dd49fb201ca294348d177bb4fa
Reviewed-on: https://code.wireshark.org/review/14067
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-22 17:11:25 +00:00
Michael Mann 5beb48b843 Fix some hf_ field datatype conflicts.
'ieee17221.clock_source_id' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'ieee17221.stream_format' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'afp.unknown' exists multiple times with NOT compatible types: FT_UINT16 and FT_BYTES
'afp.toc_offset' exists multiple times with NOT compatible types: FT_NONE and FT_UINT64
'bootp.client_id.iaid' exists multiple times with NOT compatible types: FT_UINT32 and FT_STRING
'bthfp.chld.mode' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'canopen.pdo.data' exists multiple times with NOT compatible types: FT_STRINGZ and FT_BYTES
'canopen.sdo.data' exists multiple times with NOT compatible types: FT_UINT32 and FT_BYTES
'ceph.msg.' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'ceph.version' exists multiple times with NOT compatible types: FT_UINT16 and FT_UINT64
'cip.linkaddress' exists multiple times with NOT compatible types: FT_STRING and FT_UINT8
'dnp3.al.ana' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dnp3.al.anaout' exists multiple times with NOT compatible types: FT_FLOAT and FT_INT32
'dtls.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'ssl.handshake.cert_url.url_hash_len' exists multiple times with NOT compatible types: FT_STRING and FT_UINT16
'dvb-s2_gse.label' exists multiple times with NOT compatible types: FT_UINT24 and FT_ETHER
'fcdns.rply.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'fcdns.req.fc4type' exists multiple times with NOT compatible types: FT_NONE and FT_UINT8
'icmp.int_info.name' exists multiple times with NOT compatible types: FT_STRING and FT_BOOLEAN
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8
'icmpv6.ilnp.nb_locs' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'mausb.clear_transfers.status' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mikey.v' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_NONE
'mswsp.rangeboundry.ultype' exists multiple times with NOT compatible types: FT_STRING and FT_UINT32
'mswsp.arrayvector.address64' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_offset' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'nlm.lock.l_len' exists multiple times with NOT compatible types: FT_UINT32 and FT_UINT64
'pflog.saddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.daddr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pflog.saddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pflog.daddr' exists multiple times with NOT compatible types: FT_BYTES and FT_IPv6
'pgm.spm.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.src' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.nak.grp' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.poll.path' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv4 and FT_IPv6
'pgm.opts.ccdata.acker' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4
'pgm.opts.redirect.dlr' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Iaf694699d108a12db172da8dd9fbab211adb329d
Reviewed-on: https://code.wireshark.org/review/14070
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 16:51:22 +00:00
Michael Mann 1ac725f643 packet-cigi.c: Fix conflicting datatypes for hf_ fields.
'cigi.entity_control' exists multiple times with NOT compatible types: FT_FLOAT and FT_STRINGZ
'cigi.entity_control' exists multiple times with NOT compatible types: FT_STRINGZ and FT_FLOAT
'cigi.art_part_control.yaw_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.rate_control.part_id' exists multiple times with NOT compatible types: FT_UINT8 and FT_INT8
'cigi.view_control.yoff_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.zoff_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.roll_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.pitch_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.view_control.yaw_enable' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT8
'cigi.short_symbol_control.value1' exists multiple times with NOT compatible types: FT_FLOAT and FT_UINT32
'cigi.short_symbol_control.value2' exists multiple times with NOT compatible types: FT_FLOAT and FT_UINT32

Also replace some homemade true_false_string with some from tfs.h

Change-Id: Ied8dfb320abb6f3218304fd06c5481167f1169ec
Reviewed-on: https://code.wireshark.org/review/14069
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 16:50:58 +00:00
Michael Mann 5aa3a88f1a Separate hf_ fields that share filter names with FT_UINT32 and FT_UINT64 datatypes.
'bitcoin.addr.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.inv.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getdata.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.notfound.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getblocks.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.getheaders.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.input_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.in.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.output_count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.tx.out.script_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.block.num_transactions' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.headers.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.merkleblock.flags.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.merkleblock.hashes.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.string.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'bitcoin.data.count' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'dcerpc.referent_id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'dmp.body.id' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'edonkey.start_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'edonkey.end_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.entry' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.phoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.shoff' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_vaddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_paddr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_filesz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_memsz' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.p_align' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_addr' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_offset' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_addralign' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.sh_entsize' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.symbol_table.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.symbol_table.size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.tag' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.value' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.pointer' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.ignored' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'elf.dynamic.unspecified' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'h248.contextId' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'hcrt.data32' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'wlan_mgt.fixed.psmp.stainfo.reserved' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'isakmp.tf.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'isakmp.ike.attr.life_duration' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'jxta.message.element.content.length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'rmt-lct.tsi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'rmt-lct.toi' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'smb.alloc_size' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32
'trmac.response_code' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT32

Change-Id: I903933e6448bac3d3374eef1a6a0bc4771c1a9f4
Reviewed-on: https://code.wireshark.org/review/14060
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 13:40:27 +00:00
Michael Mann d1f5b376fa Resolve hf_ field name conflicts with protocol strings.
Change-Id: Ie719e2f14c6eaf536035ab30dcb40e91c431c6e4
Reviewed-on: https://code.wireshark.org/review/14061
Petri-Dish: Michael Mann <mmann78@netscape.net>
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>
2016-02-22 13:32:01 +00:00
Martin Kaiser 7e55f4102c pvfs2: read a 64bit value in one go
Change-Id: If630e03f82add403cb978969a8ebbb6f0bbcbad0
Reviewed-on: https://code.wireshark.org/review/14064
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-22 13:31:19 +00:00
Martin Kaiser 5f8c555615 sigcomp: don't THROW() an exception from a dissector
when there's a decompression failure, we already flag up an expert info and exit
we can just delete the exception

in dissect_udvm_reference_operand_memory(), we return 0 on error and
let the caller do a check

Change-Id: I2cd301896794260457f57209e5efc0939b27b339
Reviewed-on: https://code.wireshark.org/review/14063
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-02-21 22:44:00 +00:00
Michael Mann 14881e72d6 tshark: load decode_as_entries file
With Wireshark 2.0, some dissector preferences were removed in favor of 'Decode As' functionality.
But the settings saved in the GUI are not loaded in tshark, preventing their use without an explicit call to '-d' option.
Let's load decode_as_entries file by default and have it overridden by the '-d' option if required.

Ping-Bug: 12124
Change-Id: I134a424cb6cf8fc89b7096a659ef1605314a70a2
Reviewed-on: https://code.wireshark.org/review/13956
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-21 18:25:01 +00:00
João Valverde 8889be17d0 autotools: Add GLib/GTK configuration definitions to package cflags
Change-Id: I67e1d41ded89114db80dd33b966840fca6175eb0
Reviewed-on: https://code.wireshark.org/review/14048
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 18:22:06 +00:00
João Valverde de1dc7e7b8 autotools: Improve libnl configuration and dependency
Change-Id: I3de7c2a6292a2f3fc57fdb849c23c3b31f6e4a13
Reviewed-on: https://code.wireshark.org/review/14052
Petri-Dish: João Valverde <j@v6e.pt>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 18:21:42 +00:00
Gerald Combs 6e1d7b935b [Automatic update for 2016-02-21]
Update manuf, services enterprise-numbers, translations, and other items.

Change-Id: I80f7d5b45ef26dc4fb1ca34d549acfb2c0a54bcf
Reviewed-on: https://code.wireshark.org/review/14054
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2016-02-21 16:10:48 +00:00
Michael Mann 48de5c5a1b [SPICE] Prevent really long loop in dissect_spice_link_capabilities.
Not all paths will access the tvb to have it throw a bounds error for large loop values.

Bug: 12151
Change-Id: I74a6d0d8ddece0f95027493a7d408cc54d94d25a
Reviewed-on: https://code.wireshark.org/review/14051
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-21 14:56:07 +00:00
Michael Mann 024bf62555 Fix typo in PTP / Follow_Up Message / Follow Up information TLV.
scaledLastGMPhaseChange -> scaledLastGmFreqChange

Bug: 12150
Change-Id: I7b3d58c7d59364acb029e87f42da464c8840b95a
Reviewed-on: https://code.wireshark.org/review/14050
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-21 13:26:46 +00:00
João Valverde f0fb79d534 autotools: Use pkg-config autoconf macros for GLib/GTK
Remove mostly obsolete aclocal macros. Make GTK build flags a strict superset
of GLib flags. Use GTK build variables for GTK GUI and GLib elsewhere. Add
dependency flags explicitly instead of using WS_CPPFLAGS.

Some minor improvements and fixes for missing/unnecessary variables (no impact
on our test builds).

Change-Id: I3e1f067a875f79d6516c1fa7af986f17a7a6b671
Reviewed-on: https://code.wireshark.org/review/14005
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 07:51:55 +00:00
João Valverde 8b46cbbceb autotools: Cleanup some installation directory stuff
Replace hacky code to set install dirs in config.h and use path definitions
only where required.

Change-Id: I78735f730725382c1b3aca876705e5e6e1872d78
Reviewed-on: https://code.wireshark.org/review/14033
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 07:45:55 +00:00
João Valverde e282c19520 autotools: Fix multiple repetitions of -L build flags
Before:

  WS_LDFLAGS=' -Wl,--as-needed -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib'

After:

  WS_LDFLAGS=' -Wl,--as-needed -L/usr/local/lib'

Bumps autoconf required version to 2.64.

Change-Id: Idac0e0382481ddd954b07d9ac729f33c9d11639a
Reviewed-on: https://code.wireshark.org/review/14041
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-21 07:45:33 +00:00
Guy Harris a299e69bb2 No need to export the 48-byte-header Linux USB dissector.
Nobody looks it up, so just register it in the wtap_encap table, as we
do with the 64-byte-header Linux USB dissector, the USBPCAP dissector,
and the FreeBSD USB dissector.

Change-Id: I5da098d799a63449f17a26924b3ba2de36536896
Reviewed-on: https://code.wireshark.org/review/14046
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-21 02:03:01 +00:00
Guy Harris 3514a5a11b Disssect the flags fields in the FreeBSD USB headers.
Change-Id: I6f59028b1134378762691c35897cfcdc04e6dbfe
Reviewed-on: https://code.wireshark.org/review/14045
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-21 00:56:33 +00:00
Peter Wu 8276a8840f ieee80211: handle reserved grouping value
Prevents a buffer overrun (read). Show expert info such that it can be
detected (in case the value is non-reserved in the future).

Bug: 11818
Change-Id: I6cd2f4c9deb5cb515a53743aa83193521b2331e8
Reviewed-on: https://code.wireshark.org/review/14040
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-20 18:23:14 +00:00
Alexis La Goutte 236828b463 MIP6: fix mip6.lri.reserved exists multiple times with NOT compatible types: FT_BOOLEAN and FT_UINT16
It is a typo on display field and fix also wrong comment...

Change-Id: Idb93641d6e4197b59e453e4ad629af4c0454c8d3
Reviewed-on: https://code.wireshark.org/review/14038
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-20 16:52:15 +00:00
Alexis La Goutte 82f881890b DLM3: Remove macro for declare header field (hf)
checkhf don't like macro and for avoid warning/error, remove macro for declare hf

Change-Id: I5521b3176027ddc673e8f6c793ab4eb0d01cd8fd
Reviewed-on: https://code.wireshark.org/review/14018
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-20 16:46:56 +00:00
Alexis La Goutte 0e8dc993d8 MIH: fix exists multiple times with NOT compatible types
'mih.tlv_length' exists multiple times with NOT compatible types: FT_UINT64 and FT_UINT8
'mih.mihf_id' exists multiple times with NOT compatible types: FT_ETHER and FT_STRING
'mih.mihf_id' exists multiple times with NOT compatible types: FT_IPv4 and FT_ETHER
'mih.mihf_id' exists multiple times with NOT compatible types: FT_IPv6 and FT_IPv4

Change-Id: Ib4be551920c7389100ece668e1af288a7d712725
Reviewed-on: https://code.wireshark.org/review/14027
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-20 16:40:22 +00:00
Peter Wu 3b644a75c9 Fix various off-by-one in buffer sizes
Some only allow buffer overruns (read), others also buffer overflows
(write).

Found by looking for '\[ *N *\]' where N is 255, 0xff, 15 and 0xf (case
insensitive).

Change-Id: I250687e2fdeb8fbd5eaf0bbb8251c3dab9640760
Reviewed-on: https://code.wireshark.org/review/14034
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-20 15:18:08 +00:00
Peter Wu 55b5b7caf3 ber: fix buffer overrun when handling empty sets
When a set is empty, only a terminator (ber_sequence_t with NULL func)
is present. In that case, do not try to find more values as that will
never succeed.

Bug: 12106
Change-Id: I26cd4ba84a9580e92d5921592a27c2af17c0bebf
Reviewed-on: https://code.wireshark.org/review/14028
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-20 15:06:45 +00:00
Peter Wu c31425f9ae gsm_abis_oml: fix buffer overrun
Do not read outside boundaries when tag is exactly 0xff.

    tag = tvb_get_guint8(tvb, offset);
    tdef = find_tlv_tag(tag);
        ...
        return &nm_att_tlvdef_base.def[tag];

Bug: 11825
Change-Id: I42e624185abb2166aa0f8d0dbd71a2a86fc0b18e
Reviewed-on: https://code.wireshark.org/review/14030
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-20 14:38:48 +00:00
João Valverde 071dfd761d sober: fix cannot optimize loops warning [-Wunsafe-loop-optimizations]
Change-Id: I180b1ef53f9adcf4625d0cf9ee35066aa21ee59b
Reviewed-on: https://code.wireshark.org/review/13934
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20 14:27:42 +00:00
João Valverde 1b3ae81e9e autotools: Use Qt flags only for building Qt GUI
Change-Id: I041e2fab6de948c803cc059e78358077000efee8
Reviewed-on: https://code.wireshark.org/review/14006
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20 14:27:00 +00:00
Pascal Quantin a795a3033a Qt: only "Comment" column should be editable in Local Interfaces management tab
Bug: 12146
Change-Id: Ife481b7c0b201a54749e212416571aa3dcaf7542
Reviewed-on: https://code.wireshark.org/review/14017
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-20 14:26:46 +00:00
João Valverde 5eafa903f6 autotools: Move common automake code for plugins to an include file
Change-Id: Icac1eb17ff78ae5ae54b61820618bf3c5733bd96
Reviewed-on: https://code.wireshark.org/review/14003
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-20 14:26:39 +00:00
Guy Harris 01444ab46b Fix indentation.
Change-Id: I4737a3410cde2d8ead79b42d9734b4412cb5ca77
Reviewed-on: https://code.wireshark.org/review/14026
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-20 11:14:15 +00:00
Guy Harris f31449076c Initial support for FreeBSD USB captures.
(There's also work needed in libpcap; that's also in progress.)

Change-Id: Iff5a34c139a000865e2d78cc17a4af5ff24fb44b
Reviewed-on: https://code.wireshark.org/review/14025
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-20 11:12:48 +00:00
Stig Bjørlykke 6e1bf33854 Qt: Set maximumSize on AccordionFrame widget buttons
After switching to QPushButton for buttons in SearchFrame and GoToFrame
the widgets needs a maximum size to reduce the height of the frame.

Change-Id: I504e65add446c4262e9b1e02ff3e41c08d1cfdfd
Reviewed-on: https://code.wireshark.org/review/14019
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-20 09:27:03 +00:00
Dave Rigby 3dddc52bb8 Couchbase: Dissect optional expiry in subdoc mutation requests
Add support for dissecting the optional 4-byte expiry field in
sub-document API request packets. This is permitted for any
single-path mutation request; increasing the length of the extras
section from 3 to 7 bytes.

Change-Id: I0609dbc6f6a8e62028cd20a28609fc3016e44910
Reviewed-on: https://code.wireshark.org/review/14004
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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-02-20 07:35:13 +00:00
Guy Harris cee50b8c31 Put back a define to make the Lua build happy.
DO NOT USE THIS FOR ANYTHING NEW.

Change-Id: Iee2ddaa2eeb735b33aef9e81b32bb4a3535e3451
Reviewed-on: https://code.wireshark.org/review/14023
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-20 00:06:28 +00:00
Guy Harris ddeab2c1de Get rid of PCAP_ENCAP_USB.
It doesn't correspond to anything we support - and the old Linux USB
LINKTYPE_ value of 186 doesn't give enough information to dissect the
packets (it discards the event type, for example), so we drop the rest
of our support for it as well.

Change-Id: I6f537d9263174aba4320edf5140e1d1540e979c8
Reviewed-on: https://code.wireshark.org/review/14020
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-19 22:46:10 +00:00
João Valverde eb9d2b0092 Fix implicit conversion from 64 to 32 bits
Change size_t to something that is guaranteed to fit in a socklen_t.

Fix incorrect AC_DEFINE too.

Change-Id: I710f32fb1e5bd4f51843d380aa8ed8b6acd98c02
Reviewed-on: https://code.wireshark.org/review/14009
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-19 21:47:04 +00:00
Stig Bjørlykke 472687b5e1 Qt: Fix Open protocol preferences button.
Do showProtocolPreferences before removing the variable which
this depends on.  The button does not work without at module.

Change-Id: I7d31aa5ab19340a4102523b13de961e799cae5e4
Reviewed-on: https://code.wireshark.org/review/14015
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-19 18:32:26 +00:00
Peter Wu de65fd6b00 rsl: avoid buffer overread
Fixes a buffer overrun in dissct_rsl_ipaccess_msg when the tag is
exactly 0xff:

        tag = tvb_get_guint8(tvb, offset);
        tdef = &rsl_att_tlvdef.def[tag];

Bug: 11829
Change-Id: I25a3c6948242a52f59431ce84c108b2e52008930
Reviewed-on: https://code.wireshark.org/review/14011
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-02-19 17:47:42 +00:00
João Valverde 8bee8bad81 Add inet_pton/inet_ntop interface to libwsutil
Change-Id: Ifc344ed33f2f7ca09a6912a5adb49dc35f07c81f
Reviewed-on: https://code.wireshark.org/review/13881
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-19 15:55:09 +00:00
João Valverde 5fec8fa746 BER/PER: Add dissector assertions to squelch scan-build bugs
packet-per.c:959:6: warning: Access to field 'aligned' results in a dereference of a null pointer (loaded from variable 'actx')
packet-ber.c:1606:29: warning: Access to field 'pinfo' results in a dereference of a null pointer (loaded from variable 'actx')
packet-ber.c:1612:24: warning: Access to field 'created_item' results in a dereference of a null pointer (loaded from variable 'actx')
packet-ber.c:3156:41: warning: Access to field 'pinfo' results in a dereference of a null pointer (loaded from variable 'actx')
packet-ber.c:3182:24: warning: Access to field 'created_item' results in a dereference of a null pointer (loaded from variable 'actx')

Change-Id: Ibae00dc29a869701fe903a5b0c9944279aaa3df7
Reviewed-on: https://code.wireshark.org/review/13936
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: João Valverde <j@v6e.pt>
2016-02-19 15:48:16 +00:00
Andreas Gruenbacher 0200cff989 DLM3: Add support for the Need Slots Recovery Command Status Flag
DLM3 minor version 1, introduced in mainline kernel commit 757a4271 from
October 2011, added some fields and a Need Slots flag to Recovery
Command Status packets.

Change-Id: Ib994223afeae6b8d6ddb75404ab2031c5a63185b
Reviewed-on: https://code.wireshark.org/review/13983
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-19 15:36:51 +00:00
Stig Bjørlykke 61f73a3262 Qt: Update AccordionFrame widgets to use common layout
- Use QPushButton for buttons and set the "Find" button as default
  in SearchFrame.
- Use QPushButton for buttons, added a "Packet:" label, and set
  the "Go to packet" button as default in GoToFrame.
- Set Qt::WA_MacSmallSize in OS X for FilterExpressionFrame and
  PreferenceEditorFrame.
- Removed QFrame::StyledPanel and QFrame::Raised from ColumnEditorFrame.
- Update ui files to reflect that AccordionFrame is used for
  AddressEditorFrame, FilterExpressionFrame and PreferenceEditorFrame.

Change-Id: Icfbfff973535317997109a1020dfe24ba932e098
Reviewed-on: https://code.wireshark.org/review/13995
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-02-19 12:16:16 +00:00
Guy Harris 4c1869f487 Don't call the hci_usb dissector through a dissector table.
It works the same regardless of what flavor of USB metadata there is,
and there's no good reason for any Bluetooth code to know, or care,
about particular flavors of USB metadata.

Add some comments while we're at it.

Change-Id: I6ea2063a015e424fc84a407231e80ef3e2a79c98
Reviewed-on: https://code.wireshark.org/review/14001
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-02-19 05:02:17 +00:00
Peter Wu f4580ac9ed ssl: fix decryption when session ticket is not used
Do not use the client-supplied session ticket for decryption when the
session is not resumed as the cached key (associated with that ticket)
is invalid for this new session. SSL Session IDs are unaffected by this
issue as only the server-issued Session ID is considered.

This fixes decryption of a SSL capture which uses the keylog file for
decryption, but where the session tickets are invalid because the server
was restarted.

Additionally, the session and session tickets stores are split to avoid
exporting session tickets via File -> Export SSL Session keys. Session
tickets should only be used internally, the CLIENT_RANDOM identifier is
shorter and is the preferred method to link secrets.

Change-Id: If96d7a4e89389825478e67e9a65401ce0607aa66
Reviewed-on: https://code.wireshark.org/review/13994
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-19 03:33:45 +00:00
Jaap Keuter eb75ec1824 Prevent inproper use of negative value
Coverity rightfully complains about inproper use of negative value.
maxlength special value '-1' should be handled appropriately.

Change-Id: Ie1818121e39fa668094d012980016444ca868e6e
Reviewed-on: https://code.wireshark.org/review/13978
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-19 03:23:07 +00:00
Alexis La Goutte 323659d85e dcerpc: fix Called function pointer is null (null dereference) found by Clang Analyzer
Change-Id: Idf98bcf617d4d6343aa233e42898cf5f26b08e33
Reviewed-on: https://code.wireshark.org/review/13974
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-19 03:20:28 +00:00