We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d98b6cb commit 7ca3afaCopy full SHA for 7ca3afa
security/selinux/xfrm.c
@@ -94,7 +94,7 @@ static int selinux_xfrm_alloc_user(struct xfrm_sec_ctx **ctxp,
94
95
ctx->ctx_doi = XFRM_SC_DOI_LSM;
96
ctx->ctx_alg = XFRM_SC_ALG_SELINUX;
97
- ctx->ctx_len = str_len;
+ ctx->ctx_len = str_len + 1;
98
memcpy(ctx->ctx_str, &uctx[1], str_len);
99
ctx->ctx_str[str_len] = '\0';
100
rc = security_context_to_sid(ctx->ctx_str, str_len,
0 commit comments