The pointer did not have any sanity check.
Addresses https://github.com/libfuse/libfuse/issues/979
{
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.
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;