|
@@ -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;
|
|
|
|
|
|
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);
|