Skip to content

Commit

Permalink
Smack: fix: invalid length set for the result of /smack/access
Browse files Browse the repository at this point in the history
Forgot to update simple_transaction_set() to take terminator
character into account.

Signed-off-by: Jarkko Sakkinen <jarkko.j.sakkinen@gmail.com>
Signed-off-by: Casey Schaufler <cschaufler@cschaufler-intel.(none)>
  • Loading branch information
Jarkko Sakkinen authored and Casey Schaufler committed Oct 18, 2011
1 parent 16014d8 commit d86b2b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/smack/smackfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1514,7 +1514,7 @@ static ssize_t smk_write_access(struct file *file, const char __user *buf,
data[0] = res == 0 ? '1' : '0';
data[1] = '\0';

simple_transaction_set(file, 1);
simple_transaction_set(file, 2);
return SMK_LOADLEN;
}

Expand Down

0 comments on commit d86b2b6

Please sign in to comment.