mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds offset regression tests and assorted fixes on var's offsets
This commit is contained in:
committed by
Felipe Zimmerle
parent
795994bb0e
commit
4ad3574cf2
@@ -66,15 +66,15 @@ inline std::vector<std::string> RegressionTest::yajl_array_to_vec_str(
|
||||
}
|
||||
|
||||
|
||||
inline std::unordered_map<std::string, std::string>
|
||||
inline std::vector<std::pair<std::string, std::string>>
|
||||
RegressionTest::yajl_array_to_map(const yajl_val &node) {
|
||||
std::unordered_map<std::string, std::string> vec;
|
||||
std::vector<std::pair<std::string, std::string>> vec;
|
||||
for (int z = 0; z < node->u.object.len; z++) {
|
||||
const char *key = node->u.object.keys[z];
|
||||
yajl_val val3 = node->u.object.values[z];
|
||||
const char *value = YAJL_GET_STRING(val3);
|
||||
std::pair<std::string, std::string> a(key, value);
|
||||
vec.insert(a);
|
||||
vec.push_back(a);
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
Reference in New Issue
Block a user