• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Révision99ce9a7e60fd12b213b985343ff8fcc172de59fd (tree)
l'heure2020-02-11 02:24:43
AuteurDr. David Alan Gilbert <dgilbert@redh...>
CommiterDr. David Alan Gilbert

Message de Log

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>

Change Summary

Modification

--- a/tools/virtiofsd/fuse_lowlevel.c
+++ b/tools/virtiofsd/fuse_lowlevel.c
@@ -1116,6 +1116,10 @@ static void do_read(fuse_req_t req, fuse_ino_t nodeid,
11161116 struct fuse_file_info fi;
11171117
11181118 arg = fuse_mbuf_iter_advance(iter, sizeof(*arg));
1119+ if (!arg) {
1120+ fuse_reply_err(req, EINVAL);
1121+ return;
1122+ }
11191123
11201124 memset(&fi, 0, sizeof(fi));
11211125 fi.fh = arg->fh;