summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2017-02-08 09:01:07 +0100
committerJames Morris <james.l.morris@oracle.com>2017-02-08 09:01:07 +0100
commite2241be62deabe09d7c681326fcb0bc707082147 (patch)
tree6d9267fb129e73e1695cf95eb22ba7d0dca3e07d /security
parenttpm: silence an array overflow warning (diff)
parentselinux: fix off-by-one in setprocattr (diff)
downloadlinux-e2241be62deabe09d7c681326fcb0bc707082147.tar.xz
linux-e2241be62deabe09d7c681326fcb0bc707082147.zip
Merge branch 'stable-4.10' of git://git.infradead.org/users/pcmoore/selinux into next
Diffstat (limited to 'security')
-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 fdc24ea65fd0..424573029c5c 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -5887,7 +5887,7 @@ static int selinux_setprocattr(struct task_struct *p,
return error;
/* Obtain a SID for the context, if one was specified. */
- if (size && str[1] && str[1] != '\n') {
+ if (size && str[0] && str[0] != '\n') {
if (str[size-1] == '\n') {
str[size-1] = 0;
size--;