]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
partitions/aix: append null character to print data from disk
authorMauricio Faria de Oliveira <mfo@canonical.com>
Tue, 21 Aug 2018 14:01:00 +0000 (16:01 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 5 Sep 2018 08:30:45 +0000 (10:30 +0200)
commitc698f5dd8b838da81c8edcf593b054f84fe1184c
treecb6593b4b8657a6e0b06b8ec8f7e9e40b4929a33
parent951319686bdfa444da9174372caee22995178aaa
partitions/aix: append null character to print data from disk

BugLink: https://bugs.launchpad.net/bugs/1787281
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>
(cherry picked from commit d43fdae7bac2def8c4314b5a49822cb7f08a45f1)
Signed-off-by: Mauricio Faria de Oliveira <mfo@canonical.com>
Acked-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
block/partitions/aix.c