Skip to content

Commit b97df7c

Browse files
cgzonespcmoore
authored andcommitted
selinux: use correct type for context length
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 <[email protected]> [PM: wrapped commit description] Signed-off-by: Paul Moore <[email protected]>
1 parent 5ea33af commit b97df7c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/selinux/xfrm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ int selinux_xfrm_state_alloc_acquire(struct xfrm_state *x,
347347
int rc;
348348
struct xfrm_sec_ctx *ctx;
349349
char *ctx_str = NULL;
350-
int str_len;
350+
u32 str_len;
351351

352352
if (!polsec)
353353
return 0;

0 commit comments

Comments
 (0)