mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
virtiofsd: do_read missing NULL check
Missing a NULL check if the argument fetch fails. Fixes: Coverity CID 1413119 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
686391112f
commit
99ce9a7e60
1 changed files with 4 additions and 0 deletions
|
@ -1116,6 +1116,10 @@ static void do_read(fuse_req_t req, fuse_ino_t nodeid,
|
|||
struct fuse_file_info fi;
|
||||
|
||||
arg = fuse_mbuf_iter_advance(iter, sizeof(*arg));
|
||||
if (!arg) {
|
||||
fuse_reply_err(req, EINVAL);
|
||||
return;
|
||||
}
|
||||
|
||||
memset(&fi, 0, sizeof(fi));
|
||||
fi.fh = arg->fh;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue