mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-15 08:14:21 +08:00
btrfs-progs: corrupt-block: fix assertion condition
The ->data is no longer a pointer but an embedded array. Resolves-coverity-id: 1372671 Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
c7a1f66a20
commit
7e955fc856
@ -899,7 +899,7 @@ static int corrupt_item_nocow(struct btrfs_trans_handle *trans,
|
||||
if (slot == 0)
|
||||
del = 0;
|
||||
/* Only accept valid eb */
|
||||
if (!leaf->data || slot >= btrfs_header_nritems(leaf)) {
|
||||
if (slot >= btrfs_header_nritems(leaf)) {
|
||||
error("invalid eb: no data or slot out of range: %d >= %d",
|
||||
slot, btrfs_header_nritems(leaf));
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user