aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r--security/selinux/hooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 98a2e92b3168..aa22a5ef5b05 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5884,7 +5884,7 @@ static int selinux_setprocattr(struct task_struct *p,
5884 return error; 5884 return error;
5885 5885
5886 /* Obtain a SID for the context, if one was specified. */ 5886 /* Obtain a SID for the context, if one was specified. */
5887 if (size && str[1] && str[1] != '\n') { 5887 if (size && str[0] && str[0] != '\n') {
5888 if (str[size-1] == '\n') { 5888 if (str[size-1] == '\n') {
5889 str[size-1] = 0; 5889 str[size-1] = 0;
5890 size--; 5890 size--;