projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
audit: Fix check of return value of strnlen_user()
[firefly-linux-kernel-4.4.55.git]
/
kernel
/
auditsc.c
diff --git
a/kernel/auditsc.c
b/kernel/auditsc.c
index d81424fbec3aaf89750fc51a511bd385078270f3..f6bc31e7dca9bd76e5579ec6786a97f70ccedb6d 100644
(file)
--- a/
kernel/auditsc.c
+++ b/
kernel/auditsc.c
@@
-1021,7
+1021,7
@@
static int audit_log_single_execve_arg(struct audit_context *context,
* for strings that are too long, we should not have created
* any.
*/
- if (unlikely((len ==
-1
) || len > MAX_ARG_STRLEN - 1)) {
+ if (unlikely((len ==
0
) || len > MAX_ARG_STRLEN - 1)) {
WARN_ON(1);
send_sig(SIGKILL, current, 0);
return -1;