diff options
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 09fd6108e421..c2da45ae5b2a 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -5858,7 +5858,7 @@ static int selinux_setprocattr(struct task_struct *p, | |||
5858 | return error; | 5858 | return error; |
5859 | 5859 | ||
5860 | /* Obtain a SID for the context, if one was specified. */ | 5860 | /* Obtain a SID for the context, if one was specified. */ |
5861 | if (size && str[1] && str[1] != '\n') { | 5861 | if (size && str[0] && str[0] != '\n') { |
5862 | if (str[size-1] == '\n') { | 5862 | if (str[size-1] == '\n') { |
5863 | str[size-1] = 0; | 5863 | str[size-1] = 0; |
5864 | size--; | 5864 | size--; |