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 2022/07/06 00:05:25 UTC

[trafficserver] branch 9.2.x updated: Add nullptr check of HTTPInfo (#8937)

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

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/9.2.x by this push:
     new 09ba3d313 Add nullptr check of HTTPInfo (#8937)
09ba3d313 is described below

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

    Add nullptr check of HTTPInfo (#8937)
    
    (cherry picked from commit b2cef8bdbc81e4f001757994d926f25d14b5738a)
---
 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 e65365c66..676cc452b 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4614,7 +4614,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();