Whamcloud - gitweb
mmp: don't assume NUL termination for MMP strings
authorAndreas Dilger <adilger@dilger.ca>
Tue, 14 Jan 2020 21:42:17 +0000 (14:42 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 25 Jan 2020 04:06:58 +0000 (23:06 -0500)
commit6b430d60caf6c4080bd32783659a819425657b69
treea967fd33e368bf2a36bdadfca333c1276939862d
parentf6c5ad97daf7b266d66987476da33d6dfe341b36
mmp: don't assume NUL termination for MMP strings

Don't assume that mmp_nodename and mmp_bdevname are NUL terminated,
since very long node/device names may completely fill the buffers.

Limit string printing to the maximum buffer size for safety, and
change the field definitions to __u8 to make it more clear that
they are not NUL-terminated strings, as is done with other strings
in the superblock that do not have NUL termination.

Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
debugfs/debugfs.c
e2fsck/util.c
lib/ext2fs/ext2_fs.h
misc/dumpe2fs.c
misc/util.c
tests/filter.sed