Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4d03f74 authored by John Johansen's avatar John Johansen
Browse files

apparmor: fix arg_size computation for when setprocattr is null terminated

parent e89b8081
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -529,7 +529,7 @@ static int apparmor_setprocattr(struct task_struct *task, char *name,
	if (!*args)
	if (!*args)
		goto out;
		goto out;


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