Date: Tue, 03 Sep 2019 14:05:46 -0000 From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r345575 - projects/fuse2/sys/fs/fuse Message-ID: <201903271415.x2REFapp008403@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Wed Mar 27 14:15:35 2019 New Revision: 345575 URL: https://svnweb.freebsd.org/changeset/base/345575 Log: fusefs: fix a derefence-after-null-check Reported by: Coverity Coverity CID: 1017940 Sponsored by: The FreeBSD Foundation Modified: projects/fuse2/sys/fs/fuse/fuse_node.c Modified: projects/fuse2/sys/fs/fuse/fuse_node.c ============================================================================== --- projects/fuse2/sys/fs/fuse/fuse_node.c Wed Mar 27 14:07:09 2019 (r345574) +++ projects/fuse2/sys/fs/fuse/fuse_node.c Wed Mar 27 14:15:35 2019 (r345575) @@ -284,8 +284,9 @@ fuse_vnode_get(struct mount *mp, return err; } if (dvp != NULL) { - MPASS((cnp->cn_flags & ISDOTDOT) == 0); - MPASS(!(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')); + MPASS(cnp && (cnp->cn_flags & ISDOTDOT) == 0); + MPASS(cnp && + !(cnp->cn_namelen == 1 && cnp->cn_nameptr[0] == '.')); fuse_vnode_setparent(*vpp, dvp); } if (dvp != NULL && cnp != NULL && (cnp->cn_flags & MAKEENTRY) != 0 &&
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903271415.x2REFapp008403>