From: Shreenidhi Shedi <yesshedi@gmail.com>
To: arnd@arndb.de, gregkh@linuxfoundation.org, paul@paul-moore.com,
eparis@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-audit@redhat.com,
yesshedi@gmail.com, Shreenidhi Shedi <sshedi@vmware.com>
Subject: [PATCH 4/5] audit: remove redundant data_len check
Date: Sun, 15 May 2022 02:44:54 +0530 [thread overview]
Message-ID: <20220514211455.284782-4-sshedi@vmware.com> (raw)
In-Reply-To: <20220514211455.284782-1-sshedi@vmware.com>
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
---
kernel/audit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/audit.c b/kernel/audit.c
index 7690c29d4ee4..0749211d5552 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
next prev parent reply other threads:[~2022-05-14 21:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-14 21:14 [PATCH 1/5] char: lp: ensure that index has not exceeded LP_NO Shreenidhi Shedi
2022-05-14 21:14 ` [PATCH 2/5] char: lp: remove redundant initialization of err Shreenidhi Shedi
2022-05-14 21:53 ` Greg KH
2022-05-14 21:14 ` [PATCH 3/5] char: lp: fix most of checkspec.pl warnings & errors Shreenidhi Shedi
2022-05-14 21:53 ` Greg KH
2022-05-14 21:14 ` Shreenidhi Shedi [this message]
2022-05-14 21:54 ` [PATCH 4/5] audit: remove redundant data_len check Greg KH
2022-05-15 23:30 ` Paul Moore
2022-05-14 21:14 ` [PATCH 5/5] audit: fix most of the checkspec.pl warnnings & errors Shreenidhi Shedi
2022-05-14 21:54 ` Greg KH
2022-05-14 21:52 ` [PATCH 1/5] char: lp: ensure that index has not exceeded LP_NO Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220514211455.284782-4-sshedi@vmware.com \
--to=yesshedi@gmail.com \
--cc=arnd@arndb.de \
--cc=eparis@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-audit@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=sshedi@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox