diff options
Diffstat (limited to 'lib/mount_util.c')
-rw-r--r-- | lib/mount_util.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/mount_util.c b/lib/mount_util.c index dd32276..02a84ef 100644 --- a/lib/mount_util.c +++ b/lib/mount_util.c @@ -359,6 +359,11 @@ int fuse_mnt_parse_fuse_fd(const char *mountpoint) int fd = -1; int len = 0; + if (mountpoint == NULL) { + fprintf(stderr, "Invalid null-ptr mount-point!\n"); + return -1; + } + if (sscanf(mountpoint, "/dev/fd/%u%n", &fd, &len) == 1 && len == strlen(mountpoint)) { return fd; |