diff --git a/src/actions/allow.h b/src/actions/allow.h index 926c10c259..e8ac4ac3e3 100644 --- a/src/actions/allow.h +++ b/src/actions/allow.h @@ -64,11 +64,11 @@ class Allow : public Action { static std::string allowTypeToName (AllowType a) { if (a == NoneAllowType) { return "None"; - } else if (a = RequestAllowType) { + } else if (a == RequestAllowType) { return "Request"; - } else if (a = PhaseAllowType) { + } else if (a == PhaseAllowType) { return "Phase"; - } else if (a = FromNowOneAllowType) { + } else if (a == FromNowOneAllowType) { return "FromNowOne"; } else { return "Unknown"; diff --git a/src/operators/verify_cc.cc b/src/operators/verify_cc.cc index 88ad55e4c1..f7b4657780 100644 --- a/src/operators/verify_cc.cc +++ b/src/operators/verify_cc.cc @@ -85,9 +85,20 @@ bool VerifyCC::init(const std::string ¶m2, std::string *error) { m_pc = pcre_compile(param.c_str(), PCRE_DOTALL|PCRE_MULTILINE, &errptr, &erroffset, NULL); - m_pce = pcre_study(m_pc, PCRE_STUDY_JIT_COMPILE, &errptr); + if (m_pc == NULL) { + error->assign(errptr); + return false; + } - if ((m_pc == NULL) || (m_pce == NULL)) { + m_pce = pcre_study(m_pc, PCRE_STUDY_JIT_COMPILE, &errptr); + if (m_pce == NULL) { + if (errptr == NULL) { + /* + * Per pcre_study(3) m_pce == NULL && errptr == NULL means + * that no addional information is found, so no need to study + */ + return true; + } error->assign(errptr); return false; } diff --git a/src/transaction.cc b/src/transaction.cc index 1f6a6f5d46..8609af5579 100644 --- a/src/transaction.cc +++ b/src/transaction.cc @@ -290,6 +290,8 @@ bool Transaction::extractArguments(const std::string &orig, free(key_c); free(value_c); } + + return true; } @@ -1740,7 +1742,7 @@ extern "C" int msc_request_body_from_file(Transaction *transaction, /** * @name msc_process_response_headers - * @brief Perform the analysis on the response readers. + * @brief Perform the analysis on the response headers. * * This function perform the analysis on the response headers, notice however * that the headers should be added prior to the execution of this function.