diff options
author | kris <kris@FreeBSD.org> | 2001-09-10 11:28:07 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-09-10 11:28:07 +0000 |
commit | bd6f9cb9b63e7a70079067566e50b59abc81ce16 (patch) | |
tree | fd84e8d4d01cdc0f4ba330211093170c75b99172 /sys/fs | |
parent | 335f7eeb6361cc1f5a1fd9251b0f63ef3451f5ba (diff) | |
download | FreeBSD-src-bd6f9cb9b63e7a70079067566e50b59abc81ce16.zip FreeBSD-src-bd6f9cb9b63e7a70079067566e50b59abc81ce16.tar.gz |
Fix some signed/unsigned integer confusion, and add bounds checking of
arguments to some functions.
Obtained from: NetBSD
Reviewed by: peter
MFC after: 2 weeks
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index 6e01f3d..116ce16 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -167,6 +167,12 @@ umapfs_mount(mp, path, data, ndp, p) /* * Now copy in the number of entries and maps for umap mapping. */ + if (args.nentries > MAPFILEENTRIES || args.gnentries > + GMAPFILEENTRIES) { + vput(lowerrootvp); + return (error); + } + amp->info_nentries = args.nentries; amp->info_gnentries = args.gnentries; error = copyin(args.mapdata, (caddr_t)amp->info_mapdata, |