Commit d4d03f74 authored by John Johansen's avatar John Johansen

apparmor: fix arg_size computation for when setprocattr is null terminated

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent e89b8081
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment