selinuxfs: use scnprintf to get real length for inode
authorliuyang34 <yangliuxm34@gmail.com>
Tue, 7 Jan 2020 01:39:18 +0000 (09:39 +0800)
committerPaul Moore <paul@paul-moore.com>
Tue, 7 Jan 2020 02:05:57 +0000 (21:05 -0500)
commit7e78c875143b639dca887e335f7d045480ec28d8
tree32560da4933b1d0b296e39528a2085da46b5082d
parentf1268534027a792f3d97a0cfff8041d314ef2fca
selinuxfs: use scnprintf to get real length for inode

The return value of snprintf maybe over the size of TMPBUFLEN, use
scnprintf instead in sel_read_class and sel_read_perm.

Signed-off-by: liuyang34 <liuyang34@xiaomi.com>
[PM: cleaned up the description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/selinuxfs.c