diff options
author | James Morris <james.l.morris@oracle.com> | 2014-07-19 17:39:19 +1000 |
---|---|---|
committer | James Morris <james.l.morris@oracle.com> | 2014-07-19 17:39:19 +1000 |
commit | 2ccf4661f315615d018686d91d030a94001d0cc6 (patch) | |
tree | f5374b5233ba5c43a4710bc8cbc5319091da044e /security/selinux/ss/conditional.c | |
parent | 32c2e6752ff0f48fe03b9e1c7c64bde580a840d2 (diff) | |
parent | 615e51fdda6f274e94b1e905fcaf6111e0d9aa20 (diff) | |
download | linux-2ccf4661f315615d018686d91d030a94001d0cc6.tar.bz2 |
Merge branch 'next' of git://git.infradead.org/users/pcmoore/selinux into next
Diffstat (limited to 'security/selinux/ss/conditional.c')
-rw-r--r-- | security/selinux/ss/conditional.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index 377d148e7157..62c6773be0b7 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c @@ -402,19 +402,14 @@ static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) int rc; struct cond_expr *expr = NULL, *last = NULL; - rc = next_entry(buf, fp, sizeof(u32)); + rc = next_entry(buf, fp, sizeof(u32) * 2); if (rc) - return rc; + goto err; node->cur_state = le32_to_cpu(buf[0]); - len = 0; - rc = next_entry(buf, fp, sizeof(u32)); - if (rc) - return rc; - /* expr */ - len = le32_to_cpu(buf[0]); + len = le32_to_cpu(buf[1]); for (i = 0; i < len; i++) { rc = next_entry(buf, fp, sizeof(u32) * 2); |