Commit Graph

14 Commits

Author SHA1 Message Date
João Valverde 19dcb725b6 epan: Remove STR_ASCII and STR_UNICODE
These display bases work to replace unprintable characters so the
name is a misnomer. In addition they are the same option and this
display behaviour is not something that is configurable.

This does not affect encodings because all our internal text strings
need to be valid UTF-8 and the source encoding is specified using
ENC_*.

Remove the assertion for valid UTF-8 in proto.c because
tvb_get_*_string() must return a valid UTF-8 string, always, and we
don't need to assert that, it is expensive.
2021-12-03 04:35:56 +00:00
Jim Borden cb88f6d4e8 BLIP: Add next gen Web-Sec-Protocol
Starting with 3.0 there is a new non backwards compatible Web-Sec-Protocol for BLIP, so the plugin should handle both (the differences are irrelevant from Wireshark's standpoint)
2021-09-09 06:38:46 +00:00
Evan Huus 8ee8808876 First pass pinfo->pool conversion, part 2
Automated find/replace of wmem_packet_scope() with pinfo->pool in all
files where it didn't cause a build failure.
2021-07-21 09:54:57 -04:00
Gerald Combs dcc8bbaf9b BLIP: Update an expert item.
Generalize the decompression error field name and description.
2020-09-23 12:44:30 -07:00
Jim Borden 4a94842710 BLIP: Fix decompression buffer bug
Until now, mistakenly, the buffer for decompressing compressed BLIP messages
has been statically allocated as 16 Kb, but that is not valid behavior.
16 Kb is the maximum size of a _compressed_ frame.  In theory, due to the
ability to zipbomb, there is virtually no upper bound on what the maximum
size of an uncompressed frame could be.  However, to keep sanity, it has
been made into a preference with a reasonable default that is not likely to
be exceeded (64 Kb).  The behavior before for this was that wireshark would
crash because the dissector would return NULL for a decompressed buffer due
to error and then try to deference it later.  A null check has been added,
so that the behavior is now that the packet will show
'<Error decompressing message>' instead, and log why it couldn't handle the
compressed message.  Closes #16866.
2020-09-23 19:36:10 +00:00
Jim Borden 845bbb9d9f BLIP: Fix issues with message decompression
Due to the way the BLIP compresses its messages, it quickly falls apart
when the messages are not examined exactly in order (as is the case
when selecting random frames inside of a capture).  The only solution
I can see is to only decompress once and store the result somewhere
that is persistent at the file level.

Change-Id: I38c781222c8efbbcded2446ae02fa7cb57c71509
Reviewed-on: https://code.wireshark.org/review/33827
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-08-23 08:40:53 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Alexis La Goutte ffb549859f blip: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I89951593122fbed19b8aaf8ee05299889b37d4f3
Reviewed-on: https://code.wireshark.org/review/33506
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Borden <jim.borden@couchbase.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-06 13:19:57 +00:00
Martin Kaiser 663096248c blip: fix used-but-marked-unused warnings
blip.c:195:4: error: 'offset' was marked unused but was used
                        offset,
                        ^
blip.c:200:22: error: 'blip_tree' was marked unused but was used
        proto_tree_add_item(blip_tree, hf_blip_ack_size, tvb, offset, varint_ack_size_length, ENC_VARINT_PROTOBUF);
                            ^
blip.c:200:56: error: 'offset' was marked unused but was used
        proto_tree_add_item(blip_tree, hf_blip_ack_size, tvb, offset, varint_ack_size_length, ENC_VARINT_PROTOBUF);
                                                              ^
blip.c:202:2: error: 'offset' was marked unused but was used
        offset += varint_ack_size_length;
        ^
blip.c:284:14: error: 'pinfo' was marked unused but was used
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "BLIP");
                    ^
blip.c:286:12: error: 'pinfo' was marked unused but was used
        col_clear(pinfo->cinfo,COL_INFO);
                  ^
blip.c:333:14: error: 'pinfo' was marked unused but was used
        col_add_str(pinfo->cinfo, COL_INFO, col_info);
                    ^
blip.c:337:34: error: 'pinfo' was marked unused but was used
                return handle_ack_message(tvb, pinfo, blip_tree, offset, value_frame_flags);
                                               ^
blip.c:346:45: error: 'pinfo' was marked unused but was used
        conversation = find_or_create_conversation(pinfo);
                                                   ^
blip.c:361:4: error: 'pinfo' was marked unused but was used
                        pinfo,
                        ^
blip.c:380:27: error: 'pinfo' was marked unused but was used
                tvb_to_use = decompress(pinfo, tvb, offset, tvb_reported_length_remaining(tvb, offset) - BLIP_BODY_CHECKSUM_SIZE);

Change-Id: I9de1a78942469cc16011fd1a21d93b81820bee80
Reviewed-on: https://code.wireshark.org/review/33373
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-05-26 19:05:10 +00:00
Dario Lombardo 5544d0a4da dissectors: remove unused assignments.
Found by clang-scan.

Change-Id: I46d3be9032c8d34a76ecd844287c36aff733ea2d
Reviewed-on: https://code.wireshark.org/review/31482
Reviewed-by: Kenneth Soerensen <knnthsrnsn@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-01-11 10:17:15 +00:00
Alexis La Goutte 7ec16dc50d Declare register and register-handoff functions.
This squelches -Wmissing-prototypes warnings.

Change-Id: I49feace8796c9786e09183e8dcf82d08e06996a2
Reviewed-on: https://code.wireshark.org/review/31193
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-12-26 07:42:44 +00:00
Peter Wu e26f464fbd blip: fix memory safety issues and a build failure without zlib
Fix use-after-free of decompress_streams when reloading a capture file.
Cleanup the z_stream on capture file closure and simplify the hash key.
Fix build in case zlib is not available, remove unnecessary headers and
fix the indentation information (tabs instead of spaces).

Change-Id: I08268db1b9714cdddfc7f47b496f3e9da518139a
Fixes: v2.9.0rc0-2492-ga8c40412d8 ("Added support for the Couchbase BLIP protocol")
Reviewed-on: https://code.wireshark.org/review/30626
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jim Borden <jim.borden@couchbase.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-14 13:27:46 +00:00
Stig Bjørlykke b0e8abcf1e blip: Use correct guint64 printf modifier
Change-Id: I6e326cc5396467a0f65edbde1148414a10e22df2
Reviewed-on: https://code.wireshark.org/review/30580
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-11-12 08:09:33 +00:00
Jim Borden a8c40412d8 Added support for the Couchbase BLIP protocol
Documentation for the protocol is available at https://github.com/couchbaselabs/BLIP-Cpp/blob/master/docs/BLIP%20Protocol.md

Bug: 15212
Change-Id: I2fe947c3af10c53d68c740241466e2de6c4be551
Reviewed-on: https://code.wireshark.org/review/30229
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-11-11 16:52:16 +00:00