Index: sys/ufs/ffs/ffs_alloc.c =================================================================== --- sys/ufs/ffs/ffs_alloc.c +++ sys/ufs/ffs/ffs_alloc.c @@ -3211,9 +3211,9 @@ cap_rights_t rights; int filetype, error; - if (req->newlen > sizeof cmd) + if (req->newptr == NULL || req->newlen > sizeof(cmd)) return (EBADRPC); - if ((error = SYSCTL_IN(req, &cmd, sizeof cmd)) != 0) + if ((error = SYSCTL_IN(req, &cmd, sizeof(cmd))) != 0) return (error); if (cmd.version != FFS_CMD_VERSION) return (ERPCMISMATCH);