- /* FIXME: How should we handle this situation? */
- if ((vm->vblk_size * vm->last_vblk_seq) != (toc->bitmap1_size << 9))
- ldm_info ("VMDB and TOCBLOCK don't agree on the database size.");
+ /*
+ * The last_vblkd_seq can be before the end of the vmdb, just make sure
+ * it is not out of bounds.
+ */
+ if ((vm->vblk_size * vm->last_vblk_seq) > (toc->bitmap1_size << 9)) {
+ ldm_crit ("VMDB exceeds allowed size specified by TOCBLOCK. "
+ "Database is corrupt. Aborting.");
+ goto out;
+ }