Author: asomers
Date: Sat Sep 21 13:00:38 2019
New Revision: 352573
URL: https://svnweb.freebsd.org/changeset/base/352573

Log:
  MF stable/12 r352534:
  
  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.
  
  Approved by: re (kib)
  Reported by: Coverity
  Coverity CID: 1405530
  MFC-With: 351961
  Sponsored by: The FreeBSD Foundation

Modified:
  releng/12.1/sys/fs/fuse/fuse_internal.c
Directory Properties:
  releng/12.1/   (props changed)

Modified: releng/12.1/sys/fs/fuse/fuse_internal.c
==============================================================================
--- releng/12.1/sys/fs/fuse/fuse_internal.c     Sat Sep 21 12:33:41 2019        
(r352572)
+++ releng/12.1/sys/fs/fuse/fuse_internal.c     Sat Sep 21 13:00:38 2019        
(r352573)
@@ -390,7 +390,7 @@ fuse_internal_invalidate_entry(struct mount *mp, struc
        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)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to