aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/selinux/ss/ebitmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index 894b6cdc11c5..7d10e5d418bb 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -374,6 +374,9 @@ int ebitmap_read(struct ebitmap *e, void *fp)
374 goto ok; 374 goto ok;
375 } 375 }
376 376
377 if (e->highbit && !count)
378 goto bad;
379
377 for (i = 0; i < count; i++) { 380 for (i = 0; i < count; i++) {
378 rc = next_entry(&startbit, fp, sizeof(u32)); 381 rc = next_entry(&startbit, fp, sizeof(u32));
379 if (rc < 0) { 382 if (rc < 0) {