summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--security/smack/smack_access.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/smack/smack_access.c b/security/smack/smack_access.c
index c062e9467b62..930e548916f3 100644
--- a/security/smack/smack_access.c
+++ b/security/smack/smack_access.c
@@ -432,7 +432,7 @@ char *smk_parse_smack(const char *string, int len)
smack = kzalloc(i + 1, GFP_KERNEL);
if (smack != NULL) {
- strncpy(smack, string, i + 1);
+ strncpy(smack, string, i);
smack[i] = '\0';
}
return smack;