trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [trafficserver] branch master updated: Fixes uninitialized argument value use in HttpTransact::issue_revalidate
Date Tue, 08 May 2018 11:10:26 GMT
This is an automated email from the ASF dual-hosted git repository.

zwoop 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 7d5e0a1  Fixes uninitialized argument value use in HttpTransact::issue_revalidate
7d5e0a1 is described below

commit 7d5e0a1f03528d36b89f51387da18a652067004e
Author: Randall Meyer <randallmeyer@yahoo.com>
AuthorDate: Mon May 7 14:48:33 2018 +0100

    Fixes uninitialized argument value use in HttpTransact::issue_revalidate
    
    issue found by clang-analyzer
---
 proxy/http/HttpTransact.cc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index acca034..eae6f70 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -2259,8 +2259,9 @@ HttpTransact::issue_revalidate(State *s)
       // make this a conditional request
       int length;
       const char *str = c_resp->value_get(MIME_FIELD_LAST_MODIFIED, MIME_LEN_LAST_MODIFIED,
&length);
-
-      s->hdr_info.server_request.value_set(MIME_FIELD_IF_MODIFIED_SINCE, MIME_LEN_IF_MODIFIED_SINCE,
str, length);
+      if (str) {
+        s->hdr_info.server_request.value_set(MIME_FIELD_IF_MODIFIED_SINCE, MIME_LEN_IF_MODIFIED_SINCE,
str, length);
+      }
       if (!s->cop_test_page)
         DUMP_HEADER("http_hdrs", &s->hdr_info.server_request, s->state_machine_id,
"Proxy's Request (Conditionalized)");
     }

-- 
To stop receiving notification emails like this one, please contact
zwoop@apache.org.

Mime
View raw message