summaryrefslogtreecommitdiffstats
path: root/lib/mangle.c
diff options
context:
space:
mode:
authorKarel Zak2011-03-04 14:44:29 +0100
committerKarel Zak2011-03-04 14:44:29 +0100
commit6c7f688b1f46c6fb31aa8a4a27d493c90e9ded37 (patch)
treef35b1f59e5f760c287af5e13a7dc4e8ada5c67f9 /lib/mangle.c
parentdocs: update TODO (diff)
downloadkernel-qcow2-util-linux-6c7f688b1f46c6fb31aa8a4a27d493c90e9ded37.tar.gz
kernel-qcow2-util-linux-6c7f688b1f46c6fb31aa8a4a27d493c90e9ded37.tar.xz
kernel-qcow2-util-linux-6c7f688b1f46c6fb31aa8a4a27d493c90e9ded37.zip
umount: segfaults with inconsistent entry in /etc/fstab
Addresses: https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/726283 Reported-by: Greg Brockman <gdb@gregbrockman.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/mangle.c')
-rw-r--r--lib/mangle.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/mangle.c b/lib/mangle.c
index 99e8281e6..a5e157bc9 100644
--- a/lib/mangle.c
+++ b/lib/mangle.c
@@ -94,6 +94,8 @@ char *unmangle(const char *s, char **end)
if (end)
*end = e;
+ if (e == s)
+ return NULL; /* empty string */
buf = malloc(sz);
if (!buf)