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

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

commit 95d4e772aaf463d5aa20cf69644b307b61e68358
Author: Masaori Koshiba <[email protected]>
AuthorDate: Tue Mar 25 07:18:38 2025 +0900

    Add nullptr check in HttpTransact::is_stale_cache_response_returnable 
(#12108)
    
    (cherry picked from commit 5b61f230d10f14d6f0d949b4c9118260bbc3875c)
---
 src/proxy/http/HttpTransact.cc | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/proxy/http/HttpTransact.cc b/src/proxy/http/HttpTransact.cc
index 7bf4239ff3..ff72cf5ac5 100644
--- a/src/proxy/http/HttpTransact.cc
+++ b/src/proxy/http/HttpTransact.cc
@@ -5944,6 +5944,10 @@ HttpTransact::is_cache_response_returnable(State *s)
 bool
 HttpTransact::is_stale_cache_response_returnable(State *s)
 {
+  if (s->cache_info.object_read == nullptr) {
+    return false;
+  }
+
   HTTPHdr *cached_response = s->cache_info.object_read->response_get();
 
   // First check if client allows cached response

Reply via email to