]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: Fix possible NULL dereference in get_btrfs_fs_root()
authorKarel Zak <kzak@redhat.com>
Thu, 31 Mar 2016 09:45:55 +0000 (11:45 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 31 Mar 2016 09:45:55 +0000 (11:45 +0200)
commite9cd2e2bd9ec91a0b1050c4aa79555d142985924
tree5da687b76440bcbf7ef925451dfb49379c21d6de
parent37dc502403e97415d23c6eb6e584ebf254a07dd9
libmount: Fix possible NULL dereference in get_btrfs_fs_root()

The function mnt_table_get_fs_root() should be robust enough to accept
NULL as mountinfo -- the right behaviour is to default to '/'.

The set_fs_root() (tab_update.c) has to understand when mountinfo is
necessary (for bind mounts and btrfs).

Reported-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/tab.c
libmount/src/tab_update.c