You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2022/07/05 22:29:59 UTC

[trafficserver] branch master updated: Add nullptr check of HTTPInfo (#8937)

This is an automated email from the ASF dual-hosted git repository.

masaori 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 b2cef8bdb Add nullptr check of HTTPInfo (#8937)
b2cef8bdb is described below

commit b2cef8bdbc81e4f001757994d926f25d14b5738a
Author: Masaori Koshiba <ma...@apache.org>
AuthorDate: Wed Jul 6 07:29:52 2022 +0900

    Add nullptr check of HTTPInfo (#8937)
---
 proxy/http/HttpSM.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 746794eb5..ded644801 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4579,7 +4579,7 @@ HttpSM::parse_range_and_compare(MIMEField *field, int64_t content_length)
     ranges[nr]._end   = end;
     ++nr;
 
-    if (cache_sm.cache_read_vc) {
+    if (cache_sm.cache_read_vc && t_state.cache_info.object_read) {
       if (!cache_sm.cache_read_vc->is_pread_capable() && cache_config_read_while_writer == 2) {
         // write in progress, check if request range not in cache yet
         HTTPInfo::FragOffset *frag_offset_tbl = t_state.cache_info.object_read->get_frag_table();