diff options
author | John Johansen <john.johansen@canonical.com> | 2016-07-10 02:46:33 -0400 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2016-07-12 11:43:10 -0400 |
commit | d4d03f74a73f3b8b2801d4d02011b6b69778cbcc (patch) | |
tree | 47f8751de4824ffe3def8e782cba942998a26843 | |
parent | e89b8081327ac9efbf273e790b8677e64fd0361a (diff) |
apparmor: fix arg_size computation for when setprocattr is null terminated
Signed-off-by: John Johansen <john.johansen@canonical.com>
-rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index c6921a0145ed..3be30c701bfa 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c | |||
@@ -529,7 +529,7 @@ static int apparmor_setprocattr(struct task_struct *task, char *name, | |||
529 | if (!*args) | 529 | if (!*args) |
530 | goto out; | 530 | goto out; |
531 | 531 | ||
532 | arg_size = size - (args - (char *) value); | 532 | arg_size = size - (args - (largs ? largs : (char *) value)); |
533 | if (strcmp(name, "current") == 0) { | 533 | if (strcmp(name, "current") == 0) { |
534 | if (strcmp(command, "changehat") == 0) { | 534 | if (strcmp(command, "changehat") == 0) { |
535 | error = aa_setprocattr_changehat(args, arg_size, | 535 | error = aa_setprocattr_changehat(args, arg_size, |