From 69ef21dcf9f8cee026da89363871366dae2db01c Mon Sep 17 00:00:00 2001 From: byronhe Date: Thu, 23 Mar 2017 03:25:57 +0800 Subject: [PATCH] fix , remove not used array `buf` in `rcv_data_frame()` fix , remove not used array `buf` in `rcv_data_frame()` --- proxy/http2/Http2ConnectionState.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 65a694ae9bf..f17ed3b5913 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -66,7 +66,6 @@ read_rcv_buffer(char *buf, size_t bufsize, unsigned &nbytes, const Http2Frame &f static Http2Error rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame) { - char buf[BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA])]; unsigned nbytes = 0; Http2StreamId id = frame.header().streamid; uint8_t pad_length = 0; @@ -145,7 +144,7 @@ rcv_data_frame(Http2ConnectionState &cstate, const Http2Frame &frame) // second time through IOBufferReader *myreader = frame.reader()->clone(); while (nbytes < payload_length - pad_length) { - size_t read_len = sizeof(buf); + size_t read_len = BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA]); if (nbytes + read_len > unpadded_length) { read_len -= nbytes + read_len - unpadded_length; }