Browse files

Backed out d92bf83

This change is bogus. fuse_module_factory_t is already a pointer
type. Additionally, if dlsym returns NULL, then you will be
dereferencing it causing a segfault. In my testing, a segfault will
happen even if dlsym returns successfully.

Thanks to Michael Theall for spotting!
  • Loading branch information...
Nikratio committed Nov 3, 2017
1 parent 16422eb commit 8ec7fd92eb5f41f3baffba91a397296afcd926ab
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/fuse.c
@@ -263,7 +263,7 @@ static int fuse_load_so_module(const char *module)
sprintf(tmp, "fuse_module_%s_factory", module);
factory = *((fuse_module_factory_t *) dlsym(so->handle, tmp));
*(void**)(&factory) = dlsym(so->handle, tmp);
if (factory == NULL) {
fprintf(stderr, "fuse: symbol <%s> not found in module: %s\n",
tmp, dlerror());

0 comments on commit 8ec7fd9

Please sign in to comment.