summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhengchao <[email protected]>2022-04-29 20:37:01 +0800
committerzhengchao <[email protected]>2022-04-29 20:37:01 +0800
commit432337da6da93fbbdb0d06b24eacbd7690b8fd83 (patch)
treef28f0c0712960d40b376c0a9c469bf96e61b6fc3
parentaf4cdebe2cd3feec0ccaf67b53794397c6a80a15 (diff)
新创建的clause,在加入哈希表时,使用了compile中的literal_ids指针,导致内存非法读。修复 TSG-9741 TSG-10495v3.6.9
-rw-r--r--src/entry/Maat_hierarchy.cpp2
-rw-r--r--src/entry/Maat_rule.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/entry/Maat_hierarchy.cpp b/src/entry/Maat_hierarchy.cpp
index daecb19..96875e8 100644
--- a/src/entry/Maat_hierarchy.cpp
+++ b/src/entry/Maat_hierarchy.cpp
@@ -254,7 +254,7 @@ static const struct Maat_hierarchy_clause* Maat_hierarchy_clause_fetch(struct Ma
memcpy(clause->literal_ids, literal_ids, n_literal_id*sizeof(struct Maat_hierarchy_literal_id));
hier->clause_id_generator++;
- HASH_ADD_KEYPTR(hh, hier->hash_dedup_clause_by_literals, literal_ids,
+ HASH_ADD_KEYPTR(hh, hier->hash_dedup_clause_by_literals, clause->literal_ids,
n_literal_id*sizeof(struct Maat_hierarchy_literal_id),
clause);
}
diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp
index bf01aa3..43249b1 100644
--- a/src/entry/Maat_rule.cpp
+++ b/src/entry/Maat_rule.cpp
@@ -57,7 +57,7 @@ extern "C"
}
#endif
-int MAAT_FRAME_VERSION_3_6_7_20220428=1;
+int MAAT_FRAME_VERSION_3_6_9_20220429=1;
int is_valid_table_name(const char* str)
{