Skip to content

Commit

Permalink
apparmor: fix arg_size computation for when setprocattr is null termi…
Browse files Browse the repository at this point in the history
…nated

Signed-off-by: John Johansen <[email protected]>
  • Loading branch information
John Johansen committed Jul 12, 2016
1 parent e89b808 commit d4d03f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/apparmor/lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
if (!*args)
goto out;

arg_size = size - (args - (char *) value);
arg_size = size - (args - (largs ? largs : (char *) value));
if (strcmp(name, "current") == 0) {
if (strcmp(command, "changehat") == 0) {
error = aa_setprocattr_changehat(args, arg_size,
Expand Down

0 comments on commit d4d03f7

Please sign in to comment.