You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by sh...@apache.org on 2020/03/10 13:35:28 UTC
[trafficserver] branch master updated: Add null check to fix error
tunnel crash
This is an automated email from the ASF dual-hosted git repository.
shinrich pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 6b634b2 Add null check to fix error tunnel crash
6b634b2 is described below
commit 6b634b2c5af6467a9db0aa6f536b19c70a80ccae
Author: Susan Hinrichs <sh...@verizonmedia.com>
AuthorDate: Mon Mar 9 13:52:03 2020 +0000
Add null check to fix error tunnel crash
---
proxy/http/HttpTunnel.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxy/http/HttpTunnel.cc b/proxy/http/HttpTunnel.cc
index 56c1a38..4e69d2a 100644
--- a/proxy/http/HttpTunnel.cc
+++ b/proxy/http/HttpTunnel.cc
@@ -1473,7 +1473,7 @@ HttpTunnel::finish_all_internal(HttpTunnelProducer *p, bool chain)
if (action == TCA_PASSTHRU_CHUNKED_CONTENT) {
// if the only chunked data was in the initial read, make sure we don't consume too much
- if (p->bytes_read == 0) {
+ if (p->bytes_read == 0 && p->buffer_start != nullptr) {
int num_read = p->buffer_start->read_avail() - p->chunked_handler.chunked_reader->read_avail();
if (num_read < p->init_bytes_done) {
p->init_bytes_done = num_read;