mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 12:07:46 +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"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace modsecurity {
|
||||
namespace operators {
|
||||
|
||||
@@ -33,7 +33,10 @@ class ValidateByteRange : public Operator {
|
||||
: Operator(op, param, negation) {
|
||||
std::memset(table, '\0', sizeof(char) * 32);
|
||||
}
|
||||
|
||||
explicit ValidateByteRange(std::string param)
|
||||
: Operator("ValidadeByteRange", param) {
|
||||
std::memset(table, '\0', sizeof(char) * 32);
|
||||
}
|
||||
~ValidateByteRange() override { }
|
||||
|
||||
bool evaluate(Transaction *transaction, const std::string &input) override;
|
||||
@@ -47,7 +50,5 @@ class ValidateByteRange : public Operator {
|
||||
} // namespace operators
|
||||
} // namespace modsecurity
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SRC_OPERATORS_VALIDATE_BYTE_RANGE_H_
|
||||
|
Reference in New Issue
Block a user