aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/audit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/audit.c')
-rw-r--r--kernel/audit.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/audit.c b/kernel/audit.c
index 5b9ad3dda885..f4799eb6977a 100644
--- a/kernel/audit.c
+++ b/kernel/audit.c
@@ -813,21 +813,21 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)
813 case AUDIT_MAKE_EQUIV: { 813 case AUDIT_MAKE_EQUIV: {
814 void *bufp = data; 814 void *bufp = data;
815 u32 sizes[2]; 815 u32 sizes[2];
816 size_t len = nlmsg_len(nlh); 816 size_t msglen = nlmsg_len(nlh);
817 char *old, *new; 817 char *old, *new;
818 818
819 err = -EINVAL; 819 err = -EINVAL;
820 if (len < 2 * sizeof(u32)) 820 if (msglen < 2 * sizeof(u32))
821 break; 821 break;
822 memcpy(sizes, bufp, 2 * sizeof(u32)); 822 memcpy(sizes, bufp, 2 * sizeof(u32));
823 bufp += 2 * sizeof(u32); 823 bufp += 2 * sizeof(u32);
824 len -= 2 * sizeof(u32); 824 msglen -= 2 * sizeof(u32);
825 old = audit_unpack_string(&bufp, &len, sizes[0]); 825 old = audit_unpack_string(&bufp, &msglen, sizes[0]);
826 if (IS_ERR(old)) { 826 if (IS_ERR(old)) {
827 err = PTR_ERR(old); 827 err = PTR_ERR(old);
828 break; 828 break;
829 } 829 }
830 new = audit_unpack_string(&bufp, &len, sizes[1]); 830 new = audit_unpack_string(&bufp, &msglen, sizes[1]);
831 if (IS_ERR(new)) { 831 if (IS_ERR(new)) {
832 err = PTR_ERR(new); 832 err = PTR_ERR(new);
833 kfree(old); 833 kfree(old);