提交 cae303df 编写于 作者: D Dan Carpenter 提交者: Paul Moore

selinux: Fix an uninitialized variable bug

We removed this initialization as a cleanup but it is probably required.

The concern is that "nel" can be zero.  I'm not an expert on SELinux
code but I think it looks possible to write an SELinux policy which
triggers this bug.  GCC doesn't catch this, but my static checker does.

Fixes: 9c312e79 ("selinux: Delete an unnecessary variable initialisation in range_read()")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: NPaul Moore <paul@paul-moore.com>
上级 342e9157
......@@ -1832,7 +1832,7 @@ u32 string_to_av_perm(struct policydb *p, u16 tclass, const char *name)
static int range_read(struct policydb *p, void *fp)
{
struct range_trans *rt;
struct range_trans *rt = NULL;
struct mls_range *r = NULL;
int i, rc;
__le32 buf[2];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册