We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35b3ad5 commit f5cdeddCopy full SHA for f5cdedd
fs/btrfs/volumes.c
@@ -6504,6 +6504,14 @@ int btrfs_read_sys_array(struct btrfs_root *root)
6504
goto out_short_read;
6505
6506
num_stripes = btrfs_chunk_num_stripes(sb, chunk);
6507
+ if (!num_stripes) {
6508
+ printk(KERN_ERR
6509
+ "BTRFS: invalid number of stripes %u in sys_array at offset %u\n",
6510
+ num_stripes, cur_offset);
6511
+ ret = -EIO;
6512
+ break;
6513
+ }
6514
+
6515
len = btrfs_chunk_item_size(num_stripes);
6516
if (cur_offset + len > array_size)
6517
0 commit comments