]> git.baikalelectronics.ru Git - kernel.git/commit
audit: Fix check of return value of strnlen_user()
authorJan Kara <jack@suse.cz>
Tue, 2 Jun 2015 15:08:29 +0000 (17:08 +0200)
committerPaul Moore <pmoore@redhat.com>
Thu, 11 Jun 2015 19:49:54 +0000 (15:49 -0400)
commit72b6f1f8840bbe785cf1182e3c5ed2cc1528cdc8
treead90ee6ce9a6f59f566afbbeeee02c655aef13b6
parent483cf452899367638b8b52c48fc4ba0049cef23f
audit: Fix check of return value of strnlen_user()

strnlen_user() returns 0 when it hits fault, not -1. Fix the test in
audit_log_single_execve_arg(). Luckily this shouldn't ever happen unless
there's a kernel bug so it's mostly a cosmetic fix.

CC: Paul Moore <pmoore@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Paul Moore <pmoore@redhat.com>
kernel/auditsc.c