summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <[email protected]>2024-10-29 07:34:11 +0000
committerroot <[email protected]>2024-10-29 07:34:11 +0000
commit5c6e65e1ec6cbb93ab722da9379a0537de938e28 (patch)
tree09b2869ae31449ba5611472e89c8c4d31be38996
parentef65ec1447d900f105c93b86ac55339d83d987f6 (diff)
TSG-22871: fix para wrong when check rule is enabled
-rw-r--r--shaping/src/shaper_maat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/shaping/src/shaper_maat.cpp b/shaping/src/shaper_maat.cpp
index e74c280..9655838 100644
--- a/shaping/src/shaper_maat.cpp
+++ b/shaping/src/shaper_maat.cpp
@@ -452,7 +452,7 @@ int shaper_rule_is_enabled(struct shaping_thread_ctx *ctx, uuid_t rule_uuid)
{
char uuid_str[UUID_STR_LEN] = {0};
uuid_unparse(rule_uuid, uuid_str);
- struct shaping_rule *s_rule = (struct shaping_rule*)maat_plugin_table_get_ex_data(g_maat_instance, SHAPING_RULE_TABLE_NAME, uuid_str, sizeof(uuid_str));
+ struct shaping_rule *s_rule = (struct shaping_rule*)maat_plugin_table_get_ex_data(g_maat_instance, SHAPING_RULE_TABLE_NAME, uuid_str, strlen(uuid_str));
if (s_rule) {
return 1;