aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2015-02-01 20:13:13 +0100
committerMichael Mann <mmann78@netscape.net>2015-02-03 01:09:48 +0000
commitec618b55ee9033153f63464d115c8698648d7dd7 (patch)
treea6a44bf16b98190c8a9c161077c3562d37cac12e
parent71fd34da6cb9e7a9f1a0f4c783b1b6811b1dc9ff (diff)
HTTP2: Fix offset for heuristic
With >= draft-14, length is encoded in 3 octets (2 octets before) Bug: 10908 Change-Id: I061570186206548fafcc39a8df0ba6bafe8576a0 Reviewed-on: https://code.wireshark.org/review/6883 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--epan/dissectors/packet-http2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c
index 0a89d47003..0c01edce2b 100644
--- a/epan/dissectors/packet-http2.c
+++ b/epan/dissectors/packet-http2.c
@@ -1413,7 +1413,8 @@ dissect_http2_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da
if (tvb_memeql(tvb, 0, kMagicHello, MAGIC_FRAME_LENGTH) != 0) {
/* we couldn't find the Magic Hello (PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n)
see if there's a valid frame type (0-11 are defined at the moment) */
- if (tvb_reported_length(tvb)<2 || tvb_get_guint8(tvb, 2)>HTTP2_BLOCKED)
+ if (tvb_captured_length(tvb)<4 || tvb_get_guint8(tvb, 3)>HTTP2_BLOCKED)
+
return (FALSE);
}