From: Miklos Szeredi Date: Fri, 5 Aug 2005 10:35:26 +0000 (+0000) Subject: fix X-Git-Tag: fuse_2_4_0_pre2~22 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cc1b97c5eb5e5420b72b60a3fe321b56d2790b91;p=qemu-gpiodev%2Flibfuse.git fix --- diff --git a/ChangeLog b/ChangeLog index 8d8e1f5..4bc79dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-05 Miklos Szeredi + + * fusermount: don't allow empty mountpoint argument, which defeats + automatic umounting in fuse_main(). Bugreport by Václav Jůza + 2005-08-03 Miklos Szeredi * fix warnings in fuse.h and fuse_lowlevel.h if -Wshadow compiler diff --git a/util/fusermount.c b/util/fusermount.c index 21504d4..03760dd 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -905,6 +905,11 @@ static char *resolve_path(const char *orig) char *lastcomp; const char *toresolv; + if (!orig[0]) { + fprintf(stderr, "%s: invalid mountpoint '%s'\n", progname, orig); + return NULL; + } + copy = strdup(orig); if (copy == NULL) { fprintf(stderr, "%s: failed to allocate memory\n", progname);