mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-02 08:42:48 +00:00
Check the filehandle size when mounting.
Obtained from: Constantine Sapuntzakis <csapuntz@openbsd.org>
This commit is contained in:
parent
6a0fc191fb
commit
7b141d5db3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=80672
@ -804,6 +804,8 @@ nfs_mount(mp, path, data, ndp, p)
|
||||
nfs_decode_args(nmp, &args);
|
||||
return (0);
|
||||
}
|
||||
if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX)
|
||||
return (EINVAL);
|
||||
error = copyin((caddr_t)args.fh, (caddr_t)nfh, args.fhsize);
|
||||
if (error)
|
||||
return (error);
|
||||
|
@ -804,6 +804,8 @@ nfs_mount(mp, path, data, ndp, p)
|
||||
nfs_decode_args(nmp, &args);
|
||||
return (0);
|
||||
}
|
||||
if (args.fhsize < 0 || args.fhsize > NFSX_V3FHMAX)
|
||||
return (EINVAL);
|
||||
error = copyin((caddr_t)args.fh, (caddr_t)nfh, args.fhsize);
|
||||
if (error)
|
||||
return (error);
|
||||
|
Loading…
Reference in New Issue
Block a user