Repository: trafficserver Updated Branches: refs/heads/master b12b0399f -> 72035e508
TS-3444 Initialize the MimeFieldIter properly. This also feels more robust. Coverity CID #1271332 Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/72035e50 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/72035e50 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/72035e50 Branch: refs/heads/master Commit: 72035e5084f35e30a9021d03058264d4143b2662 Parents: b12b039 Author: Leif Hedstrom <[email protected]> Authored: Wed Mar 18 18:16:56 2015 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Thu Mar 19 08:26:10 2015 -0600 ---------------------------------------------------------------------- proxy/hdrs/MIME.h | 4 ++++ proxy/http2/HTTP2.cc | 1 - proxy/http2/Http2ConnectionState.cc | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72035e50/proxy/hdrs/MIME.h ---------------------------------------------------------------------- diff --git a/proxy/hdrs/MIME.h b/proxy/hdrs/MIME.h index 4b001b1..011c77e 100644 --- a/proxy/hdrs/MIME.h +++ b/proxy/hdrs/MIME.h @@ -876,6 +876,10 @@ MIMEField::has_dups() const struct MIMEFieldIter { + MIMEFieldIter() + : m_slot(0), m_block(NULL) + {} + uint32_t m_slot; MIMEFieldBlockImpl *m_block; }; http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72035e50/proxy/http2/HTTP2.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc index 530186b..cee56c1 100644 --- a/proxy/http2/HTTP2.cc +++ b/proxy/http2/HTTP2.cc @@ -962,7 +962,6 @@ REGRESSION_TEST(HPACK_Encode)(RegressionTest * t, int, int *pstatus) buf_len -= len; MIMEFieldIter field_iter; - field_iter.m_block = NULL; bool cont = false; len += http2_write_header_fragment(headers, field_iter, buf, buf_len, dynamic_table, cont); http://git-wip-us.apache.org/repos/asf/trafficserver/blob/72035e50/proxy/http2/Http2ConnectionState.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 7f8ebbe..58ab90d 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -892,7 +892,6 @@ Http2ConnectionState::send_headers_frame(FetchSM *fetch_sm) } MIMEFieldIter field_iter; - field_iter.m_block = NULL; bool cont = false; do { // Handle first sending frame is as HEADERS
