aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2014-05-31 20:58:16 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2014-05-31 19:00:07 +0000
commita92d6bdbf48028ba1067305934d4e11a53fc0f97 (patch)
treec77db2d09f8418639a550c3e09da22f4545062d7
parentaf10e831678648c55b71b24999259f164b2533d3 (diff)
HTTP2: try to please OSX 10.6 x64 buildbot
Change-Id: I79e7a619b5dadb68b70f8b057494cc970a655cc7 Reviewed-on: https://code.wireshark.org/review/1903 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-http2.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/epan/dissectors/packet-http2.c b/epan/dissectors/packet-http2.c
index 09771f2dd4..5790222afc 100644
--- a/epan/dissectors/packet-http2.c
+++ b/epan/dissectors/packet-http2.c
@@ -367,7 +367,7 @@ inflate_http2_header_block(tvbuff_t *tvb, packet_info *pinfo, guint offset,
nghttp2_hd_inflater *hd_inflater;
tvbuff_t *header_tvb = tvb_new_composite();
int rv;
- int header_len = 0;
+ int header_len = 0, len;
int final;
if(!h2session) {
/* We may not be able to track all HTTP/2 session if we miss
@@ -386,8 +386,8 @@ inflate_http2_header_block(tvbuff_t *tvb, packet_info *pinfo, guint offset,
nghttp2_nv nv;
int inflate_flags = 0;
- rv = nghttp2_hd_inflate_hd(hd_inflater, &nv,
- &inflate_flags, headbuf, headlen, final);
+ rv = (int)nghttp2_hd_inflate_hd(hd_inflater, &nv,
+ &inflate_flags, headbuf, headlen, final);
if(rv < 0) {
break;
@@ -411,12 +411,13 @@ inflate_http2_header_block(tvbuff_t *tvb, packet_info *pinfo, guint offset,
memcpy(&str[4+nv.namelen], (char *)&nv.valuelen, 4);
memcpy(&str[4+nv.namelen+4], nv.value, nv.valuelen);
- header_len += + 4 + nv.namelen + 4 + nv.valuelen;
+ len = (int)(4 + nv.namelen + 4 + nv.valuelen);
+ header_len += len;
- /* Now setup the tvb buffer to have the new data */
- next_tvb = tvb_new_child_real_data(tvb, str, 4+nv.namelen+4+nv.valuelen, 4+nv.namelen+4+nv.valuelen);
- tvb_set_free_cb(next_tvb, g_free);
- tvb_composite_append(header_tvb, next_tvb);
+ /* Now setup the tvb buffer to have the new data */
+ next_tvb = tvb_new_child_real_data(tvb, str, len, len);
+ tvb_set_free_cb(next_tvb, g_free);
+ tvb_composite_append(header_tvb, next_tvb);
}
if(inflate_flags & NGHTTP2_HD_INFLATE_FINAL) {
nghttp2_hd_inflate_end_headers(hd_inflater);