partitions/aix: append null character to print data from disk
authorMauricio Faria de Oliveira <mfo@canonical.com>
Thu, 26 Jul 2018 01:46:29 +0000 (22:46 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:44 +0000 (22:43 +0200)
commitf3677a5c7d080ccc03a5acbfdc90f22ccf984877
tree7dfcb8e9754f014f9aa2be89ed5f09b9634e7e55
parent758289892a132d9497d3a9f9e17823dbadb41ba9
partitions/aix: append null character to print data from disk

[ Upstream commit d43fdae7bac2def8c4314b5a49822cb7f08a45f1 ]

Even if properly initialized, the lvname array (i.e., strings)
is read from disk, and might contain corrupt data (e.g., lack
the null terminating character for strings).

So, make sure the partition name string used in pr_warn() has
the null terminating character.

Fixes: 6ceea22bbbc8 ("partitions: add aix lvm partition support files")
Suggested-by: Daniel J. Axtens <daniel.axtens@canonical.com>
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
block/partitions/aix.c