From f88e08f34d2d4f398f23797707e1c50cd306e405 Mon Sep 17 00:00:00 2001 From: Bernd Schubert Date: Tue, 25 Jun 2024 07:05:19 +0200 Subject: Add nullptr check in fuse_session_mount The pointer did not have any sanity check. Addresses https://github.com/libfuse/libfuse/issues/979 --- lib/fuse_lowlevel.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/fuse_lowlevel.c') diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 74b0424..8bfeb01 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -3256,6 +3256,11 @@ int fuse_session_mount(struct fuse_session *se, const char *mountpoint) { int fd; + if (mountpoint == NULL) { + fuse_log(FUSE_LOG_ERR, "Invalid null-ptr mountpoint!\n"); + return -1; + } + /* * Make sure file descriptors 0, 1 and 2 are open, otherwise chaos * would ensue. -- cgit v1.2.3