For '.' and '..' entries only the file type in e.attr.st_mode and the inode
number in e.attr.st_ino are used. But it's prudent to at least initialize
the other fields of struct fuse_entry_param as well, instead of using
random values from the stack.
struct fuse_entry_param e;
if (is_dot_or_dotdot(name)) {
- e.ino = 0;
- e.attr.st_ino = d->entry->d_ino;
- e.attr.st_mode = d->entry->d_type << 12;
+ e = (struct fuse_entry_param) {
+ .attr.st_ino = d->entry->d_ino,
+ .attr.st_mode = d->entry->d_type << 12,
+ };
} else {
err = lo_do_lookup(req, ino, name, &e);
if (err)