ext4: don't assume that mmp_nodename/bdevname have NUL
authorAndreas Dilger <adilger@dilger.ca>
Sun, 26 Jan 2020 22:03:34 +0000 (15:03 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Feb 2020 18:52:58 +0000 (19:52 +0100)
commitf080204b677d03ed9fc85476e8c92a140c0bb834
tree3788ef9db595c13b961cdad8f04f0ac8cbfebd87
parent86c30da1b684084001dbdae4d60920f966cf6532
ext4: don't assume that mmp_nodename/bdevname have NUL

commit 14c9ca0583eee8df285d68a0e6ec71053efd2228 upstream.

Don't assume that the mmp_nodename and mmp_bdevname strings are NUL
terminated, since they are filled in by snprintf(), which is not
guaranteed to do so.

Link: https://lore.kernel.org/r/1580076215-1048-1-git-send-email-adilger@dilger.ca
Signed-off-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mmp.c