Commit 5ee6cfdd authored by Shreenidhi Shedi's avatar Shreenidhi Shedi Committed by Paul Moore

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: default avatarShreenidhi Shedi <sshedi@vmware.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent f2906aa8
...@@ -1390,7 +1390,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) ...@@ -1390,7 +1390,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
str); str);
} else { } else {
audit_log_format(ab, " data="); audit_log_format(ab, " data=");
if (data_len > 0 && str[data_len - 1] == '\0') if (str[data_len - 1] == '\0')
data_len--; data_len--;
audit_log_n_untrustedstring(ab, str, data_len); audit_log_n_untrustedstring(ab, str, data_len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment