Commit Graph

259 Commits

Author SHA1 Message Date
Peter Wu 2c7c705157 http2: fix dissection when using Upgrade
The fix for bug 11331 has as side-effect that the HTTP part of a
conversation is not dissected on the second pass.

Fix it by calling the HTTP2 dissector only when it was detected via
heuristics, and not via Upgrade (since that would be handled by the
http loop).

While at it, remove the use of tvb_new_subset_remaining since the
original tvb is not touched and move the comment about the proxy to the
right place.

Tested with the capture from Alexis (plain HTTP2 via Upgrade), the one
from bug 11331 (plain HTTP2 via heuristics) and a HTTP2 in SSL capture
(via heuristics).

Change-Id: Iead7682aa8d5114e4edcfd54eabcd0d659056cc1
Reviewed-on: https://code.wireshark.org/review/10541
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-09-16 06:05:39 +00:00
Stig Bjørlykke ecc4f756bd Added Reload Lua plugins.
This is initial support for reloading Lua plugins without
restarting the application.

Still todo:
- Deregister FileHandlers
- Support deregister ProtoField with existing abbrev (same_name_hfinfo)
- Add a progress dialog when reloading many plugins
- Search for memory leakages in wslua functions

Change-Id: I48870d8741251705ca15ffe1068613fcb0cb18c1
Reviewed-on: https://code.wireshark.org/review/5028
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-08-11 12:09:07 +00:00
Guy Harris 711edcfa84 Set the reported length of chunk data correctly.
The reported length should be the size of the chunk, not the remaining
size of dechunked data.

Update some comments while we're at it.

Change-Id: Ia71948fb5ecebdaae3e171c53fd88cf72dcf76a3
Reviewed-on: https://code.wireshark.org/review/9846
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-01 18:28:14 +00:00
Michael Mann 21e5a950ad Remove all preferences related to enabling/disabling heuristic dissectors.
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector.

Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled.

Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22
Reviewed-on: https://code.wireshark.org/review/9610
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Roland Knall <rknall@gmail.com>
Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-17 17:12:22 +00:00
Michael Mann be7d295fbf Add "user presentable" and "unique string ids" to heuristic table entries.
This allows better presentation of heuristic dissectors to the end user.

Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6
Reviewed-on: https://code.wireshark.org/review/9602
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12 03:14:38 +00:00
Pascal Quantin d36930e2d4 HTTP2: fix dissection of traffic over HTTP port
Bug: 11331
Change-Id: Ib85e18ebb3c958d68ee3a4295d35982ffcd375ee
Reviewed-on: https://code.wireshark.org/review/9525
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-09 17:05:28 +00:00
Gerald Combs 9c28594529 Add a preferences editor frame.
This replaces the single preference editor dialog in the GTK+ UI.

Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5
Reviewed-on: https://code.wireshark.org/review/8966
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-06-18 00:46:50 +00:00
Jeff Morriss 0cec384fde Register http.unknown_header as an FT_STRING (rather than FT_BYTES).
This avoids assertions when the field is added with proto_tree_add_string*()
(some of which show up in the fuzzed capture in bug 11254).

Ping-Bug: 11254
Change-Id: Iaf02f59443da0cf279d65eed049122d4dfaf7bcd
Reviewed-on: https://code.wireshark.org/review/8829
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-06-08 04:51:04 +00:00
Michael Mann 6abf51316b Eliminate proto_tree_add_text from packet-http.c
Change-Id: Ib94eabeea865ef5c5d9ce4cef26d9faa51c5659d
Reviewed-on: https://code.wireshark.org/review/8715
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>
2015-05-31 21:09:13 +00:00
Andy Ling c58f51b321 HTTP: Add support of PATCH method (RFC 5789)
Bug: 11229
Change-Id: I915d2efb873bfa72d500070f382dad10a991ecd4
Reviewed-on: https://code.wireshark.org/review/8673
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Tested-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-05-29 05:24:13 +00:00
Graham Bloice 8933cbb3e3 HTTP: Fix small typo in a field description
Change-Id: I31a676f5e514b32f891496230eb70cac571730f9
Reviewed-on: https://code.wireshark.org/review/7511
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-03-03 13:37:54 +00:00
Jeff Morriss 29feae5f98 Use tcp_dissect_pdus() in the SSTP dissector.
I happened across the discussion in Ia44e0791b6ee78ad594de342c4f2401bad9beb4e
which indicates that protocols running over SSL can use tcp_dissect_pdus() too.
So do it in the SSTP dissector.

Change-Id: I3de14c1b2af5e4e5fe3630121366b71a5ad223cf
Reviewed-on: https://code.wireshark.org/review/7333
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-02-26 12:34:50 +00:00
Peter Wu 4ee6bcbd2e websocket: avoid recursion, use tcp_dissect_pdus
Use tcp_dissect_pdus to handle reassembly and avoid a recursion in
dissect_websocket. The HTTP dissector is modified to preserve
desegmentation functionality (tested with the capture from bug 8448).

As tcp_dissect_pdus is used now, the workaround for bug 8448 can be
removed and the actual frame dissection logic becomes simpler (the
length is checked in get_websocket_frame_length).

Bug: 10989
Change-Id: I67af96a6c7be88c2a77e1c4138abe90bdb880774
Reviewed-on: https://code.wireshark.org/review/7285
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-24 06:47:55 +00:00
Hofer Manuel c8f6d2151d Add a dissector for Microsoft's SSTP protocol.
... with some changes from Jeff Morriss:
- Change how SSTP is "registered": rather than trying something complicated,
  just put the intelligence for recognizing SSTP into the HTTP dissector.
  (This does mean the SSTP dissector needs to do its own desegmentation now
  but it makes things much cleaner.)
- Use proto_tree_add_subtree_format() instead of proto_tree_add_text() +
  proto_item_add_subtree().
- The messagetype is 16 bits, use tvb_get_guint16() instead of tvb_get_guint8()
  (fixes COL_INFO display)
- A few other few misc. cleanups

(I didn't update NEWS because I can no longer build NEWS without adding UTF8
fancy quotes and so forth.)

Bug: 8239
Change-Id: I3631ae65f67bea69815ccf43472fdbcac3ca3499
Reviewed-on: https://code.wireshark.org/review/7227
Petri-Dish: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-19 05:15:12 +00:00
Guy Harris 859511db14 Make UAT record update callbacks return a success/failure indication.
Have them return TRUE on success and FALSE on failure.  Check the return
value rather than whether the error string pointer is null or not.

Change-Id: I800a03bcd70a6bbb7b217cf7c4800e9cdcf2189c
Reviewed-on: https://code.wireshark.org/review/7222
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-18 00:41:09 +00:00
Pascal Quantin e915db7cc8 Do not iterate over reported length when using tvb_find_line_end
if captured length < reported length, this will trigger an infinite loop

Change-Id: I6557b455e7bbff12658a934e5bb13a42c023e133
Reviewed-on: https://code.wireshark.org/review/7053
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-02-10 14:02:20 +00:00
Pascal Quantin b01ef11f87 HTTP: revert a change done in g0ee179c
As indicated in the comment above, the previous code was done on purpose to handle the NUL case

Bug: 10866
Change-Id: I66eb9f6fbc9477456310978b420ba30975d81b0a
Reviewed-on: https://code.wireshark.org/review/6621
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-18 14:38:30 +00:00
Michael Mann ada1eec702 SE_COPY_ADDRESS -> WMEM_COPY_ADDRESS
Copy addresses with wmem-scope instead of (forced) seasonal scope.  All existing instances were converted to wmem_file_scope, but the flexibility is there for other scopes.

Change-Id: I8e58837b9ef574ec7dd87e278470d7063ae8c1c2
Reviewed-on: https://code.wireshark.org/review/6564
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-16 15:25:18 +00:00
Jeff Morriss a4d1709994 (Trivial) Move a comment next to the code related to it.
Change-Id: I83749a1b30059cc8e8f13b58fbde74e9ab873582
Reviewed-on: https://code.wireshark.org/review/6562
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2015-01-16 02:48:34 +00:00
Alexis La Goutte adf088173a HTTP: fix implicit conversion shortens 64-bit value into a 32-bit value
It will be make Mac OS X buildbot happy

Change-Id: I628445c1358675a58cc2d26ce1ca3007dd619ff3
Reviewed-on: https://code.wireshark.org/review/6551
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-15 18:28:26 +00:00
Uli Heilmeier 69d32a99bb HTTP Dissector: Add CitrixAGBasic authentication
Citrix uses a proprietary authentication schema called CitrixAGBasic for
their StoreFront/Web Interface product.

The Header looks like:
Authorization: CitrixAGBasic username="dGVzdHVzZXI="; domain= \
       "dGVzdGRvbWFpbg=="; password="c2VjcmV0"; AGESessionId= \
       "YzI0NmRkMmFmYmE5ZTk5M2I5ZDRkN2UwYzYzZWExN2U="

This patch enhances the HTTP dissector to decode this authentication data.

Due to non-discolsure I can only provide a faked GET request as a pcap
capture (attached to this bug).

Bug: 10851
Change-Id: Ic8e48db94809c9c64889cd050911de3fe23cdcdd
Reviewed-on: https://code.wireshark.org/review/6526
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-15 16:55:21 +00:00
Pascal Quantin 0ee179c8c6 HTTP: allocate header_name in packet scope instead of file scope
While we are at it, factorize the copy of value string

Change-Id: I2a16155641b8bd8623baf51f787a5f450e7b3803
Reviewed-on: https://code.wireshark.org/review/6530
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-14 09:16:02 +00:00
Guy Harris bc23f79729 UAT error string pointers should not be const pointers.
UAT error strings are usually allocated by g_strdup() or
g_strdup_printf(), and must ultimately be freed by the caller.

Make the pointer-to-error-string-pointer arguments to various functions
be "char **", not "const char **".

Fix cases that finds where a raw string was being used, as that won't
work if you try to free it; g_strdup() it instead.

Add a missing free of an error string.

Remove some no-longer-necessary casts.

Remove some unnecessary g_strdup()s (the string being handed to it was
already g_malloc()ated).

Change some variable declarations to match.

Put in XXX comments for some cases where the error string is just freed,
without being shown to the user.

Change-Id: I40297746a2ef729c56763baeddbb0842386fa0d0
Reviewed-on: https://code.wireshark.org/review/6525
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-13 20:20:03 +00:00
Martin Mathieson 48db2548a9 Deleting unneccessary #includes from dissectors.
Second batch (packet-eth.c -> packet-icmpv6.d).

Will look at cleaning up and committing script afterwards.

Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594
Reviewed-on: https://code.wireshark.org/review/6013
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-23 12:22:54 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Guy Harris 2b006ad30e Have a heur_dissector_list_t be an opaque handle.
This allows dissector lists to be looked up by name, so they can be
shared by multiple dissectors.

(This means that there's no "udplite" heuristic dissector list, but
there shouldn't be one - protocols can run atop UDP or UDPLite equally
well, and they share a port namespace and uint dissector table, so they
should share a heuristic dissector table as well.)

Change-Id: Ifb2d2c294938c06d348a159adea7a57db8d770a7
Reviewed-on: https://code.wireshark.org/review/5936
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-21 04:14:24 +00:00
Michael Mann 962fa218ef Replace uses of proto_get_frame_protocols with proto_is_frame_protocol when only one protocol is desired.
Also use proto_get_frame_protocols in main_menubar.c instead of doing it "manually".

Change-Id: Ie7a365c538700f2cebdd1e3d253f2fd9b189f5cf
Reviewed-on: https://code.wireshark.org/review/5851
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-19 18:00:20 +00:00
Peter Wu 6ee78f3be1 http: properly calculate end of chunked response
It was previously assumed that the remainder of a packet contains a
chunked-body response. This does not have be the case, and if the
assumption is violated, then the dissector would add multiple parts to a
single "De-chunked entity body".

This patch properly calculates the end of a chunked-body response,
taking the optional trailer-part into account and adjusting the size of
the chunked-body data as needed.

The CRLF in last-chunk that was previously dissected as "Chunk Boundary"
is the last CRLF that closes chunked-body, it is not part of last-chunk
(as it has no chunk-data to terminate).

A new header field is added for this trailer-part (RFC 7230 sec. 4.1).

Bug: 10707
Change-Id: Ifef1cc7dd0443edca4198eb1c27f58719f85fa9f
Reviewed-on: https://code.wireshark.org/review/5526
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
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>
2014-12-16 15:23:41 +00:00
Michael Mann e3a04bb392 Ensure dissector data parameter is used instead of pinfo->private_data when passing data between dissectors using the "media_type" subdissector.
Change-Id: I82cbfed770b41404bc42cb6a4413db07d04dffdc
Reviewed-on: https://code.wireshark.org/review/5462
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: Anders Broman <a.broman58@gmail.com>
2014-11-25 15:18:05 +00:00
Michael Mann a600ef6d59 Have media dissector take its "media type parameter" from dissector data parameter instead of pinfo->private_data.
Change-Id: I0a0cb0b4838bc4e55a759fb6031355892c220c8e
Reviewed-on: https://code.wireshark.org/review/5461
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-25 07:26:56 +00:00
Stig Bjørlykke ea167053ff Improved deregistering fields.
This improvement avoids use of deallocated memory (crash) if using a
deregistered field in display filter, color filter, custom column and
other cases when the field is used as "interesting field".

This functionality is currently used in http, imf and ldap preferences.

Also removed unused proto_registrar_n() as this does not work correctly
after deregistering fields.

Change-Id: I043e3bf7a98bd773c9801e712a012d1eab8a7f94
Reviewed-on: https://code.wireshark.org/review/5161
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-11-10 08:01:12 +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 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
Peter Wu 1318d4cfe7 http: ignore response body for HEAD requests
Responses to HEAD requests must not have a message body, so do not
attempt to use the Content-Length and similar headers that indicate a
non-empty message body in the response. Those point to the entity that
would be returned for non-HEAD requests.

Requests do not have request_method set, so do not limit desegmentation
by HEAD in that case. Verified by comparing the output of `tshark -O
http` and by looking in the Wireshark GTK UI.

Bug: 6064
Change-Id: I7f027a06d8480673ca9754037d080c3b25cc5816
Reviewed-on: https://code.wireshark.org/review/4357
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-10-01 19:14:53 +00:00
Alexis La Goutte 35453cf118 HTTP: Fix indent (use tab)
Change-Id: I4056d8b876f71c1f9ce4804a4dc4b0d16ab5afda
Reviewed-on: https://code.wireshark.org/review/3409
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-07 13:41:31 +00:00
AndersBroman dd424c6225 Handle the case where the previous PDU has left an extra CRLF in the stream.RFC 2626 In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected. In other words, if the server is reading the protocol stream at the beginning of a message and receives a CRLF first, it should ignore the CRLF.
Change-Id: I97ba94f451463c8facd2c20bf6b7364f095119e7
Reviewed-on: https://code.wireshark.org/review/2808
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 14:00:50 +00:00
AndersBroman f0ed0e69fa Get rid of soft-deprecated API:s
Change-Id: Ieb4a3f07a7831c141ba8ce9c075e72091ef909be
Reviewed-on: https://code.wireshark.org/review/2798
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 09:04:33 +00:00
Evan Huus f1ff6635a8 Warn about unencrypted HTTP traffic over port 443
At the suggestion of Toralf Förster. This includes an expert info, as well as
making SSL a new-style dissector and rejecting traffic that looks like
unencrypted text.

Change-Id: Ib09ea0d97952330f092590ff3fc6488807cdbb81
Reviewed-on: https://code.wireshark.org/review/2693
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30 21:10:11 +00:00
Michael Mann 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Guy Harris 46ecf18fbd Use address_to_str(NULL, ...) for strings allocated outside dissectors.
ep_address_to_str() doesn't crash if called outside packet scope, but
it's still not correct to use outside packet scope.  Use
address_to_str(NULL, ...) to allocate those strings, and then explicitly
free them when we're done; exceptions don't get thrown between the
allocate and free, so there's no risk of a leak.

Change-Id: Iea2af93b0757e648d399e2ba64249224eb7e9e3c
Reviewed-on: https://code.wireshark.org/review/2438
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19 18:58:49 +00:00
Michael Mann b0bc4d5535 Revert "Fixup: ep_address_to_str -> address_to_str"
Most (all?) of these functions are being called within GUI, so they can't have packet_scope, which is why they weren't already converted (I made this mistake once already)

This reverts commit 7fea55a054.

Change-Id: I4bf29b206e5e1f5daefcec131309a8f6e78e1eb1
Reviewed-on: https://code.wireshark.org/review/2428
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:26:57 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Michael Mann daa70feddc Revert "Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining"
See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 021e7afc9f.

Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f
Reviewed-on: https://code.wireshark.org/review/2429
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 17:23:41 +00:00
Dario Lombardo 7fea55a054 Fixup: ep_address_to_str -> address_to_str
Change-Id: Id49ba07e32a71357b50b32de7cecfd80e412d508
Reviewed-on: https://code.wireshark.org/review/2379
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:22:02 +00:00
Dario Lombardo 021e7afc9f Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66
Reviewed-on: https://code.wireshark.org/review/2378
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:20:32 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo 971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Evan Huus abed02a8f7 Fix fencepost error in HTTP dissector
Strndup adds +1 for the null-terminator itself, no need to do it in the caller.
This was causing us to go past the end of the buffer when the HTTP header line
didn't have any spaces in it. Caught by Alexis using ASAN.

Bug:10135
Change-Id: Iee1b26da4740b774581ca6ec784ee40f7b920832
Reviewed-on: https://code.wireshark.org/review/1806
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-05-26 23:15:49 +00:00
AndersBroman 2cfda31ff0 Change the signature of dissector_try_heuristic() to return hdtbl_entry
which can be used to call the found heuristic dissector on the next pass.

Introduce call_heur_dissector_direct() to be used to call a heuristic
dissector which accepted the frame on the first pass.

Change-Id: I524edd717b7d92b510bd60acfeea686d5f2b4582
Reviewed-on: https://code.wireshark.org/review/1697
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-21 20:17:29 +00:00