]> 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)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2021 09:55:45 +0000 (11:55 +0200)
commitb5a4d57a5c9cca7dae3463a0dba3e194d2affde9
treec7d644067e821dedb1727774fe087a598fb83078
parentbb894a44936097e38cb86301d69da83cf5a15e70
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