diff options
| author | liuxueli <[email protected]> | 2021-03-15 11:25:59 +0800 |
|---|---|---|
| committer | liuxueli <[email protected]> | 2021-03-15 11:25:59 +0800 |
| commit | 673eeb94130e4e939431b5c03e703b67d8927ac8 (patch) | |
| tree | 850be9d2c555ff4d371d2ec5b7a90366206720c3 | |
| parent | dc6d324b52a331edaf8fcdd27b51046682f78dd6 (diff) | |
校验子句的序号值,避免越界重启v3.1.14
| -rw-r--r-- | src/entry/Maat_rule.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/entry/Maat_rule.cpp b/src/entry/Maat_rule.cpp index c35b023..481b556 100644 --- a/src/entry/Maat_rule.cpp +++ b/src/entry/Maat_rule.cpp @@ -34,6 +34,7 @@ #include "stream_fuzzy_hash.h" #include "gram_index_engine.h" +#include "bool_matcher.h" #define GIT_VERSION_CATTER(v) __attribute__((__used__)) const char * GIT_VERSION_##v = NULL #define GIT_VERSION_EXPEND(v) GIT_VERSION_CATTER(v) @@ -1486,6 +1487,14 @@ void update_group2compile_rule(struct Maat_table_schema* table, const char* tabl table->udpate_err_cnt++; return; } + if(db_g2c_rule.clause_index>=MAX_ITEMS_PER_BOOL_EXPR) + { + MESA_handle_runtime_log(logger,RLOG_LV_INFO,maat_module , + "update error, invalid clause index of group2compile table %s:%s", + table->table_name[table->updating_name], table_line); + table->udpate_err_cnt++; + return; + } if(is_valid_table_name(virtual_table_name)) { db_g2c_rule.virtual_table_id=Maat_table_get_id_by_name(table_mgr, virtual_table_name); |
