diff --git a/libsepol/src/ebitmap.c b/libsepol/src/ebitmap.c index fe8beb87..218adc29 100644 --- a/libsepol/src/ebitmap.c +++ b/libsepol/src/ebitmap.c @@ -453,6 +453,12 @@ int ebitmap_read(ebitmap_t * e, void *fp) l = n; } + if (count && l->startbit + MAPSIZE != e->highbit) { + printf + ("security: ebitmap: hight bit %u has not the expected value %zu\n", + e->highbit, l->startbit + MAPSIZE); + goto bad; + } ok: rc = 0;