mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 20:32:04 +09:00
ANDROID: fuse-bpf: fix fuse_create_open_finalize
If we hit an error during fuse_create_open, some variables will be undefined during the finalize, so check that they were actually initialized before accessing. Bug: 217570523 Test: attempt to over fill disk Signed-off-by: Daniel Rosenberg <drosen@google.com> Change-Id: I094564b83e49eec2a6bac5bd050b4f7327b0c979
This commit is contained in:
@@ -339,8 +339,10 @@ void *fuse_create_open_finalize(
|
||||
struct fuse_entry_out *feo = fa->out_args[0].value;
|
||||
struct fuse_open_out *foo = fa->out_args[1].value;
|
||||
|
||||
fi->nodeid = feo->nodeid;
|
||||
ff->fh = foo->fh;
|
||||
if (fi)
|
||||
fi->nodeid = feo->nodeid;
|
||||
if (ff)
|
||||
ff->fh = foo->fh;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user