mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Refactoring on the operators parsers (2/2)
This is the first step towards remove the memory leaks in the parser
This commit is contained in:
committed by
Felipe Zimmerle
parent
9cda4c0be0
commit
59114dd598
@@ -22,7 +22,7 @@
|
||||
#include "src/operators/operator.h"
|
||||
#include "src/utils/acmp.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace modsecurity {
|
||||
namespace operators {
|
||||
|
||||
@@ -34,6 +34,14 @@ class Pm : public Operator {
|
||||
: Operator(op, param, negation) {
|
||||
m_p = acmp_create(0);
|
||||
}
|
||||
Pm(std::string op, std::string param)
|
||||
: Operator(op, param) {
|
||||
m_p = acmp_create(0);
|
||||
}
|
||||
explicit Pm(std::string param)
|
||||
: Operator("Pm", param) {
|
||||
m_p = acmp_create(0);
|
||||
}
|
||||
~Pm();
|
||||
bool evaluate(Transaction *transaction, Rule *rule,
|
||||
const std::string &input) override;
|
||||
@@ -53,7 +61,6 @@ class Pm : public Operator {
|
||||
|
||||
} // namespace operators
|
||||
} // namespace modsecurity
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SRC_OPERATORS_PM_H_
|
||||
|
Reference in New Issue
Block a user