Merge remote-tracking branch 'selinux/next'
[deliverable/linux.git] / security / selinux / ss / conditional.c
index 456e1a9bcfde14e594789de0b1055c63f8dd549e..34afeadd9e73ad458dcf0eefe29e1b62b83b913a 100644 (file)
@@ -242,6 +242,8 @@ int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp)
                goto err;
 
        len = le32_to_cpu(buf[2]);
+       if (((len == 0) || (len == (u32)-1)))
+               goto err;
 
        rc = -ENOMEM;
        key = kmalloc(len + 1, GFP_KERNEL);
This page took 0.076412 seconds and 5 git commands to generate.