summaryrefslogtreecommitdiffstats
path: root/libmount/src/utils.c
diff options
context:
space:
mode:
authorKarel Zak2012-09-12 11:57:19 +0200
committerKarel Zak2012-09-12 11:57:19 +0200
commit3de77c2173e5bc8664a427ce9a8b08c68eea7c7f (patch)
tree80556bc44dd6454514a9aad406a9ace98c66c09b /libmount/src/utils.c
parentmount: losetup: remove obsolete encryption support (diff)
downloadkernel-qcow2-util-linux-3de77c2173e5bc8664a427ce9a8b08c68eea7c7f.tar.gz
kernel-qcow2-util-linux-3de77c2173e5bc8664a427ce9a8b08c68eea7c7f.tar.xz
kernel-qcow2-util-linux-3de77c2173e5bc8664a427ce9a8b08c68eea7c7f.zip
libmount: segfaults if neither /etc/filesystems nor/proc/filesystems exists
Reported-by: Juergen Daubert <jue@jue.li> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/utils.c')
-rw-r--r--libmount/src/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 245a3b25d..0cfefb347 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -473,6 +473,10 @@ static int get_filesystems(const char *filename, char ***filesystems, const char
return rc;
}
+/*
+ * Returns zero also if not found any matching filesystem. Always check
+ * @filesystems pointer!
+ */
int mnt_get_filesystems(char ***filesystems, const char *pattern)
{
int rc;