You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/08/26 21:37:21 UTC
trafficserver git commit: TS-3860 Avoid buffer overflow in debug
builds
Repository: trafficserver
Updated Branches:
refs/heads/master 73dca1132 -> b081f52e3
TS-3860 Avoid buffer overflow in debug builds
This will instead copy the header data from the HPACK struct
to the Hdr.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/b081f52e
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/b081f52e
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/b081f52e
Branch: refs/heads/master
Commit: b081f52e347e5363e512067313a51837713e5741
Parents: 73dca11
Author: Ryo Okubo <ro...@yahoo-corp.jp>
Authored: Wed Aug 26 13:35:46 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Wed Aug 26 13:35:46 2015 -0600
----------------------------------------------------------------------
proxy/http2/HTTP2.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/b081f52e/proxy/http2/HTTP2.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index b635f48..b6e34b0 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -556,7 +556,7 @@ http2_write_psuedo_headers(HTTPHdr *in, uint8_t *out, uint64_t out_len, Http2Dyn
// Add 'Status:' dummy header field
MIMEField *status_field = mime_field_create(in->m_heap, in->m_http->m_fields_impl);
mime_field_name_value_set(in->m_heap, in->m_mime, status_field, -1, HPACK_VALUE_STATUS, HPACK_LEN_STATUS, status_str,
- HPACK_LEN_STATUS_VALUE_STR, true, HPACK_LEN_STATUS + HPACK_LEN_STATUS_VALUE_STR, 0);
+ HPACK_LEN_STATUS_VALUE_STR, 0, HPACK_LEN_STATUS + HPACK_LEN_STATUS_VALUE_STR, true);
mime_hdr_field_attach(in->m_mime, status_field, 1, NULL);
// Encode psuedo headers by HPACK
@@ -1013,7 +1013,7 @@ REGRESSION_TEST(HPACK_Encode)(RegressionTest *t, int, int *pstatus)
MIMEField *field = mime_field_create(headers->m_heap, headers->m_http->m_fields_impl);
mime_field_name_value_set(headers->m_heap, headers->m_http->m_fields_impl, field, -1, expected_name, strlen(expected_name),
- expected_value, strlen(expected_value), true, strlen(expected_name) + strlen(expected_value), 1);
+ expected_value, strlen(expected_value), 1, strlen(expected_name) + strlen(expected_value), true);
mime_hdr_field_attach(headers->m_http->m_fields_impl, field, 1, NULL);
}