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 bbfe21c commit c57e49bCopy full SHA for c57e49b
fs/btrfs/volumes.c
@@ -6512,6 +6512,14 @@ int btrfs_read_sys_array(struct btrfs_root *root)
6512
goto out_short_read;
6513
6514
num_stripes = btrfs_chunk_num_stripes(sb, chunk);
6515
+ if (!num_stripes) {
6516
+ printk(KERN_ERR
6517
+ "BTRFS: invalid number of stripes %u in sys_array at offset %u\n",
6518
+ num_stripes, cur_offset);
6519
+ ret = -EIO;
6520
+ break;
6521
+ }
6522
+
6523
len = btrfs_chunk_item_size(num_stripes);
6524
if (cur_offset + len > array_size)
6525
0 commit comments