[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220515073110.304193-1-sshedi@vmware.com>
Date: Sun, 15 May 2022 13:01:09 +0530
From: Shreenidhi Shedi <yesshedi@...il.com>
To: paul@...l-moore.com, eparis@...hat.com
Cc: linux-kernel@...r.kernel.org, linux-audit@...hat.com,
yesshedi@...il.com, Shreenidhi Shedi <sshedi@...are.com>
Subject: [PATCH 1/2] audit: remove redundant data_len check
data_len is already getting checked if it's less than 2 earlier in this
function.
Signed-off-by: Shreenidhi Shedi <sshedi@...are.com>
---
kernel/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 7690c29d4..0749211d5 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -1390,7 +1390,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
str);
} else {
audit_log_format(ab, " data=");
- if (data_len > 0 && str[data_len - 1] == '\0')
+ if (str[data_len - 1] == '\0')
data_len--;
audit_log_n_untrustedstring(ab, str, data_len);
}
--
2.36.1
Powered by blists - more mailing lists