diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-11-03 10:51:06 +0000 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-11-03 10:51:06 +0000 |
commit | 8ec7fd92eb5f41f3baffba91a397296afcd926ab (patch) | |
tree | 0694adbd7f96441d2cb1641cb1ce6e6f21075d57 | |
parent | 16422eb03c3905fa3aaaf25b2b460f54f2501c8d (diff) |
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!
-rw-r--r-- | lib/fuse.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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()); |