Commit Graph

27095 Commits

Author SHA1 Message Date
Evan Huus d86b308fd4 kafka: compression codec is unsigned
Change-Id: I238e93dd035caa359fed768aa2aac4df5a0ef47e
Reviewed-on: https://code.wireshark.org/review/4875
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-10-20 15:04:30 +00:00
Guy Harris c3f14ab3d4 Don't use toupper() in the test program.
We're not including ctype.h in the test program, so don't use toupper().
The test program might not be built with GLib, so don't use
g_ascii_toupper(), either.  Just compare against both 'Y' and 'y'.

Change-Id: Iabc04a5fecb04110c0d16b24a047de72eabbb2bc
Reviewed-on: https://code.wireshark.org/review/4870
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 09:04:44 +00:00
Guy Harris 991743b0b1 Get rid of another toupper() call in favor of g_ascii_toupper().
Change-Id: If527af69ec96a91c4127c95307c3b93b79b53e2f
Reviewed-on: https://code.wireshark.org/review/4865
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 08:49:34 +00:00
Guy Harris 091aea8c3c And some more comment cleanup.
Change-Id: Idfc541a08de2ed9e1ca8bccca366612830213ead
Reviewed-on: https://code.wireshark.org/review/4858
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 08:00:00 +00:00
Guy Harris 700bfdcba6 More comment cleanup.
Change-Id: Ifa65c3090e204b93ec526358b863fdf9bafc6a03
Reviewed-on: https://code.wireshark.org/review/4857
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 07:46:09 +00:00
Guy Harris 9ffb72b8cf Clean up some comments.
Change-Id: Ibe96878ba9ae94f9f22a221797fb36d713286d32
Reviewed-on: https://code.wireshark.org/review/4856
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 07:42:37 +00:00
Guy Harris 80e6f6251e Get rid of calls to ctype.h functions.
They don't handle values outside the range -1 to 127, and their behavior
is locale-dependent.  Use g_ascii_isXXX() and g_ascii_toXXX() instead of
isXXX() and toXXX().

If you're checking for printable ASCII, don't use isascii() and don't
use iscntrl(), use g_ascii_isprint().  If you're checking for graphical
ASCII, i.e. printable ASCII except for a space, use g_ascii_isgraph().

Use ws_xton() to convert a hex digit character to the corresponding
numeric value.

Change-Id: Id3039bc586fbf66d8736c2df248c790c0d7a2330
Reviewed-on: https://code.wireshark.org/review/4851
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 06:15:19 +00:00
Guy Harris 0b9eb9f4b7 Get rid of unnecessary includes of ctype.h.
Change-Id: I2cf49f808558147ce77e7d086558966cfb2defca
Reviewed-on: https://code.wireshark.org/review/4850
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 06:02:51 +00:00
Stig Bjørlykke 39c3a794d8 Check if mask_greatest_bit_offset is within limits.
The result of the '>>' expression is undefined if mask_greatest_bit_offset = 0.

Change-Id: I15b094a5220a5075878bad65ab0b8c5279e80e8a
Reviewed-on: https://code.wireshark.org/review/4723
Reviewed-by: Evan Huus <eapache@gmail.com>
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>
2014-10-20 01:45:28 +00:00
Michael Mann 4963d99c4a Eliminate proto_tree_add_text from packet-cdp.c
Change-Id: I77e1f5788e0567dcaef9f75e1f45e61c63d54b4e
Reviewed-on: https://code.wireshark.org/review/4849
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-20 01:20:34 +00:00
Guy Harris 2b6c267a57 Eliminate use of ctype.h routines.
That way, we don't do locale-sensitive case-insensitivity (yes, the
locale can affect case-mapping - in a Turkish locale, "I" isn't the
upper-case version of "i", for example).

Change-Id: I5f7663e85160558ff3769617f924e45049c9c384
Reviewed-on: https://code.wireshark.org/review/4843
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-19 22:45:27 +00:00
Guy Harris ac55a6d2f5 Get rid of unnecessary include of ctype.h.
Change-Id: I30c4d75e16e1816c4a792e023ffe04f5a970b6d3
Reviewed-on: https://code.wireshark.org/review/4842
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-19 22:40:08 +00:00
Michael Mann 5e4e17ca5e Remove unnecessary tvb_ensure_bytes_exist calls.
All of the calls removed are followed by proto_tree_add_xxx calls of the same offset/length of the tvb_ensure_bytes_exist call.  The proto_tree_add_xxx calls should throw the exception, so we don't need the "double check".
There are probably more calls that can be removed, these were just obvious as first glance, spurred mostly by noticing the (ab)use in packet-wsp.c

Change-Id: I37cee347c8cf8ab0559e21562c802d3b37f4871e
Reviewed-on: https://code.wireshark.org/review/4833
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>
2014-10-19 15:26:43 +00:00
Gerald Combs 1427a8e986 [Automatic manuf, services and enterprise-numbers update for 2014-10-19]
Change-Id: Ifc13fdb5898cad85ba7cd35c28024f3d4fefe70a
Reviewed-on: https://code.wireshark.org/review/4839
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-10-19 15:06:03 +00:00
Alexis La Goutte db316c9d9f TDS: Make buildbot happy
Fix Field 'Server Version' (tds.server_version) is an integral value (FT_UINT32) but is being displayed as BASE_NONE

Change-Id: I601e71ac8e7928ef90fdd16956af3a34bca269a9
Reviewed-on: https://code.wireshark.org/review/4836
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-19 14:21:28 +00:00
Bill Meier 8def8ef9c4 packet-amqp.c: Temporary/preliminary fix for Bug #10582 (crash)
This is a temporary/preliminary fix to prevent the buildbot fuzz-test
 failures seen when testing the capture file attached to Bug #10582.

As noted in the bug, a complete fix will require some reworking of
  the amqp dissector.

Change-Id: I2571f1eeb46a7eede04b8d809e87b95f1ff529df
Reviewed-on: https://code.wireshark.org/review/4835
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-19 14:14:22 +00:00
Michael Mann 8842e2e893 Eliminate proto_tree_add_text from packet-tds.c
Change-Id: Ib3dc7f8a87e55ef34d4847f4837d645e418607a3
Reviewed-on: https://code.wireshark.org/review/4826
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 12:00:52 +00:00
Michael Mann 54dfe3b9b6 Eliminate proto_tree_add_text from packet-smpp.c
Change-Id: I6e1e62ff7910be535229d7e1a15557879a5cee1f
Reviewed-on: https://code.wireshark.org/review/4832
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 03:18:58 +00:00
Michael Mann 7f5398687a Eliminate proto_tree_add_text from packet-nhrp.c
Change-Id: I51702e9372551a28ea604d21d4bbf0eb4d9588ae
Reviewed-on: https://code.wireshark.org/review/4831
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 03:18:35 +00:00
Michael Mann 6720c80bab Eliminate proto_tree_add_text from packet-ismp.c
Change-Id: Ie2a395b808a8879625185a6de458f61d386cff55
Reviewed-on: https://code.wireshark.org/review/4830
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 03:13:21 +00:00
Michael Mann e0e03ee7e7 Eliminate proto_tree_add_text from packet-arp.c
Change-Id: Ie9596df97a135b411693eefc39fdbd03316166a0
Reviewed-on: https://code.wireshark.org/review/4828
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 03:08:04 +00:00
Michael Mann c347eb965b Eliminate proto_tree_add_text from packet-ipx.c
Change-Id: Ie084a33be94d91eec7f5f70ef31fcb0835ad266c
Reviewed-on: https://code.wireshark.org/review/4829
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 03:01:54 +00:00
Michael Mann 283f478964 Eliminate proto_tree_add_text from packet-igrp.c
Change-Id: If73e3bb924036b7746d15058e9fca6f551f9538c
Reviewed-on: https://code.wireshark.org/review/4827
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-19 01:43:20 +00:00
Stig Bjørlykke 147e7fe510 Lua: Added ProtoField.none
This field can be used for adding filterable subtree entries.

Change-Id: Id395c9a8194dc00e6544170631b48d71ae9dd33e
Reviewed-on: https://code.wireshark.org/review/4573
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
2014-10-18 18:25:40 +00:00
Alexis La Goutte e7b07ae73e IPv6: QuickStart option Nonce is read incorrectly
In Wireshark, the option's TTL field looks ok, but the [TTL diff] field points to the byte after the TTL field, which is part of the nonce field.
The nonce field is being read one byte after where it should be read and so the value being read is incorrect.
Moreover, the option data length says 6 but because of the extra byte being read 7 bytes are being read for this option data and the next option is read one byte later incorrectly so the options after the QuickStart option are being read incorrectly.

Found by boaz
Bug:10575

Change-Id: Icd836b2a5c2f92cef7b6fea61957a85fca5e3352
Reviewed-on: https://code.wireshark.org/review/4815
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 17:40:36 +00:00
Alexis La Goutte 51f4962203 MIPv6: Mobility Option Mobile Node Link Layer Identifier Link-layer Identifier field is read beyond the option data
there's a single IPv6 packet with Mobile Node Link Layer Identifier mobility option.
The option's data length is 9 but and since the Reserved field takes 2 bytes, the Link Layer Identifier field should take 7 bytes.
However, the Link Layer Identifier field is read until the end of the packet, which is 519 bytes.

Bug:10578
Change-Id: I518de7f6b75e5b749cb029845fd4846954ca6d0e
Reviewed-on: https://code.wireshark.org/review/4818
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 17:16:31 +00:00
Alexis La Goutte 8a10f77ab4 MIPv6: Mobility Option Binding Authorization Data for FMIPv6 Authenticator field is read beyond the option data
There's a single IPv6 packet with Binding Authorization Data for FMIPv6 mobility option.
The option's data length is 14 but and since the SPI takes 4 bytes, the Authenticator field should take 10 bytes.
However, the Authenticator field is read until the end of the packet, which is 178 bytes.

Found by boaz
Bug: 10577
Change-Id: Ia79c5131d8477c1a7c111c47c2a94e990bbeae4d
Reviewed-on: https://code.wireshark.org/review/4817
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 17:12:18 +00:00
Alexis La Goutte 31c119fa78 MIPv6: Mobility Option IPv6 Address/Prefix marks too many bytes for the address/prefix field
One of the mobility options is the IPv6 Address/Prefix.
The prefix length of this option is 52.
Note that according to RFC 5568, the prefix length is in bits and not in bytes.
The IPv6 Address/Prefix field of this option marks 52 bytes.

In addition, I'm not sure that the IPv6 Address/Prefix field is a variable size field.
RFC 5568 section 6.4.2 has a diagram of this options that shows this field as if it always takes 128 bits, and the prefix length field just says the length of the prefix (not the length of the field).

Found by boaz

Bug:10576
Change-Id: I2a9a35cb7c537ec3b91c9a089f14fa31f41d8c80
Reviewed-on: https://code.wireshark.org/review/4816
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 17:07:52 +00:00
Alexis La Goutte 8d6fd8dd23 GSM(_a_rr): Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I07fe19af11bff3d001193e4af472c05090728392
Reviewed-on: https://code.wireshark.org/review/4814
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-10-18 16:15:34 +00:00
David Ameiss 975b02f879 Converted numerous proto_tree_add_none_format() calls for bitmask/flag items to proto_tree_add_bitmask().
Correctly set the length of LBT-RM and LBT-RU header blocks.
Various other cosmetic cleanups.

Change-Id: If19bbdeb10176b8059fd4cf657719b3b9817bc6a
Reviewed-on: https://code.wireshark.org/review/4776
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-18 12:29:19 +00:00
Guy Harris 77acaa1f48 Get rid of unnecessary includes of ctype.h.
Change-Id: I9e2cd7a9fed33fc2f4b0c0da3603690450f6952d
Reviewed-on: https://code.wireshark.org/review/4809
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-18 01:22:31 +00:00
Guy Harris 1de3a5bc49 Check for printable ASCII in an ENBName.
I'm not sure why the check is only for alphabetical characters; if
that's correct, change this to use g_ascii_isalpha, and change
is_printable_ascii to is_ascii_alpha or something such as that.

Don't use ctype.h routines, as they are locale-dependent.

Change-Id: I61d0672350d35ad918e95d7e96ed5dd263102da9
Reviewed-on: https://code.wireshark.org/review/4805
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-18 00:22:55 +00:00
Guy Harris 19b7819694 Get rid of unnecessary includes of ctype.h.
Change-Id: Ibb194cd839d174af9c96f7bb1e2941b3dd6c1ce1
Reviewed-on: https://code.wireshark.org/review/4797
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 23:31:20 +00:00
Guy Harris 033f096ee9 Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which
we weren't always doing before).

Change-Id: Ieceb93029252f646397b6488f2df8a57c6d2a23d
Reviewed-on: https://code.wireshark.org/review/4794
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 23:11:18 +00:00
AndersBroman 17a1a0d5e7 SGsAP Update to V12.6.0 except for IE TMSI based NRI container.
Change-Id: Iafb62a27589de1810d4d3bd1e32f1c89898e9171
Reviewed-on: https://code.wireshark.org/review/4777
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17 14:52:12 +00:00
AndersBroman 0ceeddee17 Dissect CDMA2000 PDU if GCSNA dissector exists.
Change-Id: I866fb9bbc3e94df63231959d6745f3d45ca84020
Reviewed-on: https://code.wireshark.org/review/4772
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-17 12:01:27 +00:00
Guy Harris 23b233d741 Remove unnecessary include of <ctype.h>.
Change-Id: I596b252d5fb41e654961483cb530754442f25bc7
Reviewed-on: https://code.wireshark.org/review/4763
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:29:36 +00:00
Guy Harris 44d4339eb3 Don't use <ctype.h> macros, and eliminate an include of <ctype.h>.
This avoids locale-dependent tests, and fixes cases where we passed
signed char values to those macros (which is not safe with char being
signed, as it is on most, but not all, platforms).

Change-Id: I51d9716fe3eb02a6e98208334285c07597a6be79
Reviewed-on: https://code.wireshark.org/review/4761
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:22:20 +00:00
Guy Harris 25d9a7b5f1 Don't use <ctype.h> macros, and eliminate an include of <ctype.h>.
This avoids locale-dependent tests.

Change-Id: I709ff6b1a837fb0390b29f911d3b9ef1015a2d1e
Reviewed-on: https://code.wireshark.org/review/4758
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:09:11 +00:00
Guy Harris 762b8d78ec Don't use ctype.h routines.
That avoids locale dependency and handles possibly-signed chars (which
we weren't doing before).

Change-Id: I2afab254044e0d39dfa67acd840b9fe4ff1e6d08
Reviewed-on: https://code.wireshark.org/review/4756
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 06:01:58 +00:00
Guy Harris 0d9b449ae9 Don't use <ctype.h> macros.
They're locale-dependent (although those *particular* ones might not
be).

Remove no-longer necessary (or not-even-necessary-before-this-change)
includes of <ctype.h>

Change-Id: I1384e3ae4ccba6af9220a08773abcde7ea320573
Reviewed-on: https://code.wireshark.org/review/4755
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 01:26:27 +00:00
Guy Harris 359a32f735 No need for our own wrappers around tolower() and toupper().
We can just use g_ascii_tolower() and g_ascii_toupper();

Change-Id: I8a88a096d16ce8c60dd9151e5bdddf6747702145
Reviewed-on: https://code.wireshark.org/review/4754
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-17 01:21:48 +00:00
Guy Harris e6fcff1eb6 Use g_ascii_isalnum() rather than isalnum().
That way, we don't have to worry about casting the argument (which, in
one place, was done wrong - casting to int preserves the sign-extension
done with signed chars), and don't have to worry about a locale in which
particular 8-bit byte values are considered alphanumeric characters.

Change-Id: I129b4bfdad70ade4ab6e0a1d2c13d59ae9e6f524
Reviewed-on: https://code.wireshark.org/review/4751
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 23:46:58 +00:00
Guy Harris f249589938 Just have get_mac_lte_rapid_description() return the description string.
If get_mac_lte_rapid_description() returned FALSE, we always used "" as
the description string; just have it return the string, or return "" if
rapid ranges haven't been configured, and just use the string.

(If the code ever needs to determine in other places whether rapid ranges
have been configured, it can check s_rapid_ranges_configured, or
get_mac_lte_rapid_description() could return NULL in that case and the
code using the string can check for a null value.)

This should squelch some incorrect used-but-not-set warnings from at
least one compiler.

Change-Id: I3ed495a4beb4a553e453e7bca764d1d8a07c5e53
Reviewed-on: https://code.wireshark.org/review/4750
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 23:04:26 +00:00
Guy Harris a517d500b4 Make sort_alphabet() not fail too badly with characters in [128,255].
Treat all values in the alphabet as unsigned.

Change-Id: I4476c75352f32673a9cd131ea233465f3376fa25
Reviewed-on: https://code.wireshark.org/review/4747
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 21:56:03 +00:00
Martin Kaiser aa1f2c5e4c use supported/unsupported for the bitfield elements
order them from MSB to LSB

Change-Id: Ie758285c2cf5d19e00d6d256c49acca15ce81168
Reviewed-on: https://code.wireshark.org/review/4746
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-16 21:25:36 +00:00
Martin Kaiser ee56b721bb smartcard descriptor: start a bitfield for the features
Change-Id: I636cfdfcd61d6d5dc041f9dbc657244d94e88b7f
Reviewed-on: https://code.wireshark.org/review/4745
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-10-16 21:24:58 +00:00
AndersBroman b64183285b GTPv2 in Complete Request Message call the NAS dissector with a tvb only
containing the IE not the rest of the tvb.

Change-Id: I3eead5047b4f8de47e280ac447c66b110592bccd
Reviewed-on: https://code.wireshark.org/review/4744
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-10-16 20:32:49 +00:00
Guy Harris 71a42e0fbc Oops, I missed one "cast a char to int and use it as a subscript" case.
Casting a signed char with a negative value to int will preserve the
value, so it'll still be a negative subscript.  Cast to guchar instead,
to make sure 0x80 through 0xFF are treated as 128 to 255, not -128 to
-1.

Change-Id: I1f0b33ba3686e963d45317b45465ff335431d17f
Reviewed-on: https://code.wireshark.org/review/4742
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 20:04:28 +00:00
Guy Harris f6bc6f957a Better fix - just check that the upper and lower nibbles are >= 0xA.
An unsigned 8-bit integer is always <= 0xFF; that was the cause of the
warning.

To see whether a byte, when represented as hex, has letters for its
upper and lower nibbles, just check whether both nibbles are >= 0xA.
Cast the extracted nibbles to make sure there's no sign-extension.

Change-Id: If4c7717a5d2fe341c02e9309ee6b89973a6ac292
Reviewed-on: https://code.wireshark.org/review/4739
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-16 19:08:19 +00:00