From d86b2b61d4dea614d6f319772a90a8f98b55ed67 Mon Sep 17 00:00:00 2001 From: Jarkko Sakkinen Date: Tue, 18 Oct 2011 14:34:28 +0300 Subject: [PATCH] Smack: fix: invalid length set for the result of /smack/access Forgot to update simple_transaction_set() to take terminator character into account. Signed-off-by: Jarkko Sakkinen Signed-off-by: Casey Schaufler --- security/smack/smackfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 5498c4a2d1ae..381eecffe516 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c @@ -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; } -- 2.20.1