Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5121ac67 authored by Paul Moore's avatar Paul Moore Committed by Greg Kroah-Hartman
Browse files

selinux: improve error checking in sel_write_load()



[ Upstream commit 42c773238037c90b3302bf37a57ae3b5c3f6004a ]

Move our existing input sanity checking to the top of sel_write_load()
and add a check to ensure the buffer size is non-zero.

Move a local variable initialization from the declaration to before it
is used.

Minor style adjustments.

Reported-by: default avatarSam Sun <samsun1006219@gmail.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
[cascardo: keep fsi initialization at its declaration point as it is used earlier]
[cascardo: keep check for 64MiB size limit]
Signed-off-by: default avatarThadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 31a38a90
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment