Message ID | 1469689705-26836-14-git-send-email-lufq.fnst@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/cmds-check.c b/cmds-check.c index c52eebc..9fe3643 100644 --- a/cmds-check.c +++ b/cmds-check.c @@ -10373,7 +10373,11 @@ static int check_extent_item(struct btrfs_fs_info *fs_info, } end = (unsigned long)ei + item_size; - if (ptr >= end) { + if (ptr == end) { + goto out; + } else if (ptr > end) { + error("bad extent item [%llu %u %llu] size wrong", + key.objectid, key.type, key.offset); err |= ITEM_SIZE_MISMATCH; goto out; }