mirror of
https://github.com/containers/fuse-overlayfs.git
synced 2025-09-16 10:51:37 -04:00
Merge pull request #163 from saschagrunert/segfault
Fix possible segmentation fault in direct_fsync()
This commit is contained in:
commit
9f27377e13
6
main.c
6
main.c
@ -4593,6 +4593,12 @@ do_fsync (fuse_req_t req, fuse_ino_t ino, int datasync, int fd)
|
||||
/* Skip fsync for lower layers. */
|
||||
do_fsync = node && node->layer == get_upper_layer (lo);
|
||||
|
||||
if (node->layer == NULL)
|
||||
{
|
||||
fuse_reply_err (req, ENOENT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (fd < 0)
|
||||
strcpy (path, node->path);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user