From 3f3b3a2377ce1977dd4136aa653f2f65c3cd2fe0 Mon Sep 17 00:00:00 2001
From: Yugend <jugendd@mail.ru>
Date: Wed, 27 Mar 2024 17:41:07 +0300
Subject: [PATCH] correcting memcmp args in check_rule_mismatch function

Reference:https://github.com/linux-audit/audit-userspace/commit/3f3b3a2377ce1977dd4136aa653f2f65c3cd2fe0
Conflict:src/auditctl.c

---
 src/auditctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/auditctl.c b/src/auditctl.c
index 0d70212..3301f65 100644
--- a/src/auditctl.c
+++ b/src/auditctl.c
@@ -389,7 +389,7 @@ static void check_rule_mismatch(int lineno, const char *option)
 	}
 	memset(&tmprule, 0, sizeof(struct audit_rule_data));
 	audit_rule_syscallbyname_data(&tmprule, option);
-	if (memcmp(tmprule.mask, rule_new->mask, AUDIT_BITMASK_SIZE))
+	if (memcmp(tmprule.mask, rule_new->mask, AUDIT_BITMASK_SIZE * sizeof(tmprule.mask[0])))
 		rc = 1;
 	_audit_elf = old_audit_elf;
 	if (rc) { 
-- 
2.33.0

