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 2015/08/21 00:15:36 UTC

trafficserver git commit: TS-3859 Check the error result from pcre_study() correctly

Repository: trafficserver
Updated Branches:
  refs/heads/master 15e262ab6 -> 7c42469a7


TS-3859 Check the error result from pcre_study() correctly

On some platforms, e.g. CentOS6, it seems the pcre_study() doesn't
produce the "_extra" result. This is legitimate, but triggeres a
bug where we don't check the error result properly.


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

Branch: refs/heads/master
Commit: 7c42469a7cac9bd47734c28f6384002d30a7cd07
Parents: 15e262a
Author: Leif Hedstrom <zw...@apache.org>
Authored: Thu Aug 20 16:00:03 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Aug 20 16:14:38 2015 -0600

----------------------------------------------------------------------
 plugins/regex_remap/regex_remap.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7c42469a/plugins/regex_remap/regex_remap.cc
----------------------------------------------------------------------
diff --git a/plugins/regex_remap/regex_remap.cc b/plugins/regex_remap/regex_remap.cc
index f2e44a4..ad973ce 100644
--- a/plugins/regex_remap/regex_remap.cc
+++ b/plugins/regex_remap/regex_remap.cc
@@ -411,7 +411,7 @@ RemapRegex::compile(const char **error, int *erroffset)
   }
 
   _extra = pcre_study(_rex, 0, error);
-  if ((_extra == NULL) && (*error != 0)) {
+  if ((_extra == NULL) && error && (*error != 0)) {
     return -1;
   }