summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2016-06-10 23:14:26 +0200
committerPaul Moore <paul@paul-moore.com>2016-06-15 22:20:28 +0200
commit309c5fad5de44fb9b1703a8f7bd814a223c57d60 (patch)
tree07f701ff25e2a2143af01e65631ac6c2552219ea /security
parentnetlabel: handle sparse category maps in netlbl_catmap_getlong() (diff)
downloadlinux-309c5fad5de44fb9b1703a8f7bd814a223c57d60.tar.xz
linux-309c5fad5de44fb9b1703a8f7bd814a223c57d60.zip
selinux: fix type mismatch
avc_cache_threshold is of type unsigned int. Do not use a signed new_value in sscanf(page, "%u", &new_value). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> [PM: subject prefix fix, description cleanup] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security')
-rw-r--r--security/selinux/selinuxfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 1b1fd27de632..0765c5b053b5 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1347,7 +1347,7 @@ static ssize_t sel_write_avc_cache_threshold(struct file *file,
{
char *page;
ssize_t ret;
- int new_value;
+ unsigned int new_value;
ret = task_has_security(current, SECURITY__SETSECPARAM);
if (ret)