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

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

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

diff --git a/src/auditctl.c b/src/auditctl.c
index 7949d95c..acb1e518 100644
--- a/src/auditctl.c
+++ b/src/auditctl.c
@@ -392,7 +392,7 @@ static int check_rule_mismatch(int lineno, const char *option)
 		audit_rule_syscallbyname_data(&tmprule, ptr);
 		ptr = strtok_r(NULL, ",", &saved);
 	}
-	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;
 	free(tmp);
 
-- 
2.33.0

