If btrfs superblock contains unknown checksum type,
the values are parsed anyway.
Bogus sector size then can lead to clz() with zero argument
(this is undefined).
Reproducer found with OSS-Fuzz (issue 52286) running over
cryptsetup project (blkid is used in header init).
if (!btrfs_verify_csum(pr, bfs))
return 1;
+ /* Invalid sector size; total_bytes would be bogus. */
+ if (!le32_to_cpu(bfs->sectorsize))
+ return 1;
+
if (*bfs->label)
blkid_probe_set_label(pr,
(unsigned char *) bfs->label,