]> git.ipfire.org Git - thirdparty/util-linux.git/commit
blockdev: allow for larger values for start sector
authorThomas Abraham <tabraham@suse.com>
Thu, 22 Jul 2021 19:43:13 +0000 (15:43 -0400)
committerThomas Abraham <tabraham@suse.com>
Thu, 22 Jul 2021 19:43:13 +0000 (15:43 -0400)
commitd73a71840b881d5af0f7f16a82f0b910f0b616c0
treedeb8a3c6412ddcf28fa052c315bd7acaa80fa566
parent8344a81f7a726cef4640f9368bd6728eff6987bc
blockdev: allow for larger values for start sector

commit 9147d2ad8a ("blockdev: Don't fail on missing start sector") limits
the size of the start sector to 10 digits.

Multi-terrabyte devices can have partitions with a start sector larger than
10 digits, which will cause an sprintf() to abort due to overflowing the buffer.

It causes:
  # blockdev --report /dev/sda4
  RO    RA   SSZ   BSZ   StartSec            Size   Device
  *** buffer overflow detected ***: terminated
  Aborted (core dumped)
disk-utils/blockdev.c