X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/99c3a10404e5d1ef94397ab4df5a8b74711fc4d3..db6096698656d32db7df630594bd9617ee54f828:/bsd/vfs/vfs_subr.c diff --git a/bsd/vfs/vfs_subr.c b/bsd/vfs/vfs_subr.c index d287837a3..1c8bfc50e 100644 --- a/bsd/vfs/vfs_subr.c +++ b/bsd/vfs/vfs_subr.c @@ -4486,6 +4486,11 @@ vnode_create(uint32_t flavor, uint32_t size, void *data, vnode_t *vpp) if (param == NULL) return (EINVAL); + /* Do quick sanity check on the parameters */ + if (param->vnfs_vtype == VBAD) { + return (EINVAL); + } + #if CONFIG_TRIGGERS if ((flavor == VNCREATE_TRIGGER) && (size == VNCREATE_TRIGGER_SIZE)) { tinfo = (struct vnode_trigger_param *)data;