+ if ((le64toh(o->object.size) - offsetof(EntryObject, items)) % sizeof(EntryItem) != 0) {
+ log_error(OFSfmt": bad entry size (<= %zu): %"PRIu64,
+ offset,
+ offsetof(EntryObject, items),
+ le64toh(o->object.size));
+ return -EBADMSG;
+ }
+
+ if ((le64toh(o->object.size) - offsetof(EntryObject, items)) / sizeof(EntryItem) <= 0) {
+ log_error(OFSfmt": invalid number items in entry: %"PRIu64,
+ offset,
+ (le64toh(o->object.size) - offsetof(EntryObject, items)) / sizeof(EntryItem));
+ return -EBADMSG;
+ }
+
+ if (le64toh(o->entry.seqnum) <= 0) {
+ log_error(OFSfmt": invalid entry seqnum: %"PRIx64,
+ offset,
+ le64toh(o->entry.seqnum));