TS-2316: header_rewrite: fix for crash in client header condition

Submitted by: Manjesh Nilange <[email protected]>
Sponsored by: LinkedIn


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8e2cc15f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8e2cc15f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8e2cc15f

Branch: refs/heads/5.0.x
Commit: 8e2cc15fe2315107357970f63477fa99cb6cd04e
Parents: 3f4e1c7
Author: Alexey Ivanov <[email protected]>
Authored: Mon Nov 4 20:46:57 2013 -0800
Committer: Alexey Ivanov <[email protected]>
Committed: Sun Nov 10 18:07:53 2013 -0800

----------------------------------------------------------------------
 plugins/header_rewrite/conditions.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8e2cc15f/plugins/header_rewrite/conditions.cc
----------------------------------------------------------------------
diff --git a/plugins/header_rewrite/conditions.cc 
b/plugins/header_rewrite/conditions.cc
index 17d1ad5..fdbb309 100644
--- a/plugins/header_rewrite/conditions.cc
+++ b/plugins/header_rewrite/conditions.cc
@@ -192,10 +192,10 @@ ConditionHeader::append_value(std::string& s, const 
Resources& res)
     field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, _qualifier.c_str(), 
_qualifier.size());
     TSDebug(PLUGIN_NAME, "Getting Header: %s, field_loc: %p", 
_qualifier.c_str(), field_loc);
     if (field_loc != NULL) {
-      value = TSMimeHdrFieldValueStringGet(res.bufp, res.hdr_loc, field_loc, 
0, &len);
+      value = TSMimeHdrFieldValueStringGet(bufp, res.hdr_loc, field_loc, 0, 
&len);
       TSDebug(PLUGIN_NAME, "Appending HEADER(%s) to evaluation value -> %.*s", 
_qualifier.c_str(), len, value);
       s.append(value, len);
-      TSHandleMLocRelease(res.bufp, res.hdr_loc, field_loc);
+      TSHandleMLocRelease(bufp, res.hdr_loc, field_loc);
     }
   }
 }

Reply via email to