]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mkfs.bfs: fix memory leaks and weak code
authorKarel Zak <kzak@redhat.com>
Tue, 1 Apr 2025 13:54:07 +0000 (15:54 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 1 Apr 2025 13:54:07 +0000 (15:54 +0200)
commit2c6ce1240f118a2d00ad93060da409c3995b7f67
treeb3e593625ef1a771c6aa85a73c49ce9fdf22cd43
parentd2dadb78081989e1750423962eaf0aa79f222cc5
mkfs.bfs: fix memory leaks and weak code

- use size_t to store strlen() result
- init superblock with the default volume and fsname
- don't use strdup(), it's unnecessary as getopt_long() does not
  modify arguments
- don't use memcpy() as we need to check string sizes
- restrict verbose output 6 bytes

Addresses: https://github.com/util-linux/util-linux/pull/3488
Signed-off-by: Karel Zak <kzak@redhat.com>
disk-utils/mkfs.bfs.c