diff options
| author | Christian Göttsche <cgzones@googlemail.com> | 2022-02-17 15:21:25 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-04-20 09:06:38 +0200 |
| commit | 6f7fad6056af08a202cd34e499f214668dae157e (patch) | |
| tree | 1d7c1bd72503526465bdd04198185a03c6370ac6 /security | |
| parent | dffc859d1d9560da594e4282091781b8d2715f00 (diff) | |
| download | linux-6f7fad6056af08a202cd34e499f214668dae157e.tar.gz linux-6f7fad6056af08a202cd34e499f214668dae157e.tar.bz2 linux-6f7fad6056af08a202cd34e499f214668dae157e.zip | |
selinux: use correct type for context length
[ Upstream commit b97df7c098c531010e445da88d02b7bf7bf59ef6 ]
security_sid_to_context() expects a pointer to an u32 as the address
where to store the length of the computed context.
Reported by sparse:
security/selinux/xfrm.c:359:39: warning: incorrect type in arg 4
(different signedness)
security/selinux/xfrm.c:359:39: expected unsigned int
[usertype] *scontext_len
security/selinux/xfrm.c:359:39: got int *
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: wrapped commit description]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'security')
| -rw-r--r-- | security/selinux/xfrm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index 56e354fcdfc6..5304dd49e054 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c @@ -344,7 +344,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x, int rc; struct xfrm_sec_ctx *ctx; char *ctx_str = NULL; - int str_len; + u32 str_len; if (!polsec) return 0; |
