mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Cosmetics: assorted fixes on the coding style
This commit is contained in:
committed by
Felipe Zimmerle
parent
a88dc8efa9
commit
c1f11ab4e5
@@ -51,16 +51,16 @@ class SetVar : public Action {
|
||||
std::string variableName,
|
||||
std::string predicate) : Action("setvar"),
|
||||
m_operation(operation),
|
||||
m_predicate(predicate),
|
||||
m_collectionName(""),
|
||||
m_variableName(variableName) { }
|
||||
m_variableName(variableName),
|
||||
m_predicate(predicate) { }
|
||||
|
||||
SetVar(SetVarOperation operation,
|
||||
std::string variableName) : Action("setvar"),
|
||||
m_operation(operation),
|
||||
m_predicate(""),
|
||||
m_collectionName(""),
|
||||
m_variableName(variableName) { }
|
||||
m_variableName(variableName),
|
||||
m_predicate("") { }
|
||||
|
||||
bool evaluate(Rule *rule, Transaction *transaction) override;
|
||||
bool init(std::string *error) override;
|
||||
|
@@ -65,7 +65,6 @@ char *Utf8ToUnicode::inplace(unsigned char *input,
|
||||
uint64_t input_len, int *changed) {
|
||||
int length = 0;
|
||||
unsigned int count = 0;
|
||||
unsigned char c;
|
||||
char *data;
|
||||
char *data_orig;
|
||||
unsigned int i, len, j;
|
||||
@@ -88,6 +87,7 @@ char *Utf8ToUnicode::inplace(unsigned char *input,
|
||||
for (i = 0; i < bytes_left;) {
|
||||
int unicode_len = 0;
|
||||
unsigned int d = 0;
|
||||
unsigned char c;
|
||||
unsigned char *utf = (unsigned char *)&input[i];
|
||||
|
||||
c = *utf;
|
||||
@@ -102,8 +102,9 @@ char *Utf8ToUnicode::inplace(unsigned char *input,
|
||||
z[0] = *utf;
|
||||
z[1] = *(utf + 1);
|
||||
*data = utils::string::x2c((unsigned char*) &z);
|
||||
} else
|
||||
} else {
|
||||
*data++ = c;
|
||||
}
|
||||
}
|
||||
} else if ((c & 0xE0) == 0xC0) {
|
||||
/* If first byte begins with binary 110 it is two byte encoding*/
|
||||
|
Reference in New Issue
Block a user