Add a sanity check for a negative args.fhsize to the experimental
NFS client. MFC after: 5 days
This commit is contained in:
parent
4d84f49da4
commit
5ed9b96420
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208234
@ -951,7 +951,7 @@ nfs_mount(struct mount *mp)
|
|||||||
|
|
||||||
if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh,
|
if (vfs_getopt(mp->mnt_optnew, "fh", (void **)&args.fh,
|
||||||
&args.fhsize) == 0) {
|
&args.fhsize) == 0) {
|
||||||
if (args.fhsize > NFSX_FHMAX) {
|
if (args.fhsize < 0 || args.fhsize > NFSX_FHMAX) {
|
||||||
vfs_mount_error(mp, "Bad file handle");
|
vfs_mount_error(mp, "Bad file handle");
|
||||||
error = EINVAL;
|
error = EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user