lockd: fix access beyond unterminated strings in prints
authorAmir Goldstein <amir73il@gmail.com>
Fri, 28 Sep 2018 17:41:48 +0000 (20:41 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2018 06:32:44 +0000 (07:32 +0100)
commit4c0f637a565dd999ad5dcc3dab7a43878442c320
tree88afc812be2b7dfff564080b69eb55d1e225d136
parentdc6b735eef385b9c40a93dc1cf7e69552d0a8cdc
lockd: fix access beyond unterminated strings in prints

commit 93f38b6fae0ea8987e22d9e6c38f8dfdccd867ee upstream.

printk format used %*s instead of %.*s, so hostname_len does not limit
the number of bytes accessed from hostname.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/lockd/host.c