root lo_inode's next and prev were not set early enough, which led to
accessing addr 0x8 (or 0x4, depending on ptr size) when setting prev
variable in lo_free(lo.root.next), because lo.root.next was NULL.
struct lo_data lo = { .debug = 0 };
int ret = -1;
+ lo.root.next = lo.root.prev = &lo.root;
+
if (fuse_parse_cmdline(&args, &opts) != 0)
return 1;
if (opts.show_help) {
}
lo.debug = opts.debug;
- lo.root.next = lo.root.prev = &lo.root;
lo.root.fd = open("/", O_PATH);
lo.root.nlookup = 2;
if (lo.root.fd == -1)