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 77882a6  Fix off-by-one access in header_rewrite config parser
77882a6 is described below

commit 77882a648837c399c4ffaea7249bf5b8b0a39b6c
Author: Masakazu Kitajo <[email protected]>
AuthorDate: Wed Jun 13 17:07:18 2018 +0900

    Fix off-by-one access in header_rewrite config parser
---
 plugins/header_rewrite/header_rewrite.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/header_rewrite/header_rewrite.cc 
b/plugins/header_rewrite/header_rewrite.cc
index 7268835..1942c1b 100644
--- a/plugins/header_rewrite/header_rewrite.cc
+++ b/plugins/header_rewrite/header_rewrite.cc
@@ -171,7 +171,7 @@ RulesConfig::parse_config(const std::string &fname, 
TSHttpHookID default_hook)
       line.erase(0, 1);
     }
 
-    while (std::isspace(line[line.length() - 1])) {
+    while (line.length() > 0 && std::isspace(line[line.length() - 1])) {
       line.erase(line.length() - 1, 1);
     }
 

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to