diff options
author | Alan Somers <asomers@FreeBSD.org> | 2019-09-16 16:41:01 +0000 |
---|---|---|
committer | Alan Somers <asomers@FreeBSD.org> | 2019-09-16 16:41:01 +0000 |
commit | 320c848ff663cfee096f75ec59a9f10a41a167a7 (patch) | |
tree | 3578c6a13db9277d66d0e13021a053e929e964e7 | |
parent | 9c9634d1db94aa8e0fe8460af8c65f0fd4259a2e (diff) | |
download | src-320c848ff663cfee096f75ec59a9f10a41a167a7.tar.gz src-320c848ff663cfee096f75ec59a9f10a41a167a7.zip |
Fix an off-by-one error from r351961
That revision addressed a Coverity CID that could lead to a buffer overflow,
but it had an off-by-one error in the buffer size check.
Reported by: Coverity
Coverity CID: 1405530
MFC after: 3 days
MFC-With: 351961
Sponsored by: The FreeBSD Foundation
Notes
Notes:
svn path=/head/; revision=352417
-rw-r--r-- | sys/fs/fuse/fuse_internal.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index ba9b77c44dc1..a3fceb0e1360 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -390,7 +390,7 @@ fuse_internal_invalidate_entry(struct mount *mp, struct uio *uio) if ((err = uiomove(&fnieo, sizeof(fnieo), uio)) != 0) return (err); - if (fnieo.namelen > sizeof(name)) + if (fnieo.namelen >= sizeof(name)) return (EINVAL); if ((err = uiomove(name, fnieo.namelen, uio)) != 0) |