Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 85788
b: refs/heads/master
c: 9a4c854
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Feb 19, 2008
1 parent dede930 commit bd2e5a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14e04c3f6e64bac468f0aa38c6d47aa95b60c074
refs/heads/master: 9a4c8546f3e7c893888bccc2b3416d6214f2664a
5 changes: 4 additions & 1 deletion trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1000,9 +1000,10 @@ 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 == -1) || len > MAX_ARG_STRLEN - 1)) {
WARN_ON(1);
send_sig(SIGKILL, current, 0);
return -1;
}

/* walk the whole argument looking for non-ascii chars */
Expand All @@ -1020,6 +1021,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
if (ret) {
WARN_ON(1);
send_sig(SIGKILL, current, 0);
return -1;
}
buf[to_send] = '\0';
has_cntl = audit_string_contains_control(buf, to_send);
Expand Down Expand Up @@ -1083,6 +1085,7 @@ static int audit_log_single_execve_arg(struct audit_context *context,
if (ret) {
WARN_ON(1);
send_sig(SIGKILL, current, 0);
return -1;
}
buf[to_send] = '\0';

Expand Down

0 comments on commit bd2e5a4

Please sign in to comment.