Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2018 13:16:01 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r332023 - stable/10/sys/fs/fuse
Message-ID:  <201804041316.w34DG1EL064946@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Wed Apr  4 13:16:00 2018
New Revision: 332023
URL: https://svnweb.freebsd.org/changeset/base/332023

Log:
  MFC r330354 (eadler): sys/fuse: fix off by one error
  
  Reported by:	Ilja Van Sprundel <ivansprundel@ioactive.com>
  Submitted by:	Domagoj Stolfa <domagoj.stolfa@gmail.com>

Modified:
  stable/10/sys/fs/fuse/fuse_internal.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/fuse/fuse_internal.c
==============================================================================
--- stable/10/sys/fs/fuse/fuse_internal.c	Wed Apr  4 13:15:12 2018	(r332022)
+++ stable/10/sys/fs/fuse/fuse_internal.c	Wed Apr  4 13:16:00 2018	(r332023)
@@ -355,7 +355,7 @@ fuse_internal_readdir_processdata(struct uio *uio,
 		memcpy((char *)cookediov->base + sizeof(struct dirent) - 
 		       MAXNAMLEN - 1,
 		       (char *)buf + FUSE_NAME_OFFSET, fudge->namelen);
-		((char *)cookediov->base)[bytesavail] = '\0';
+		((char *)cookediov->base)[bytesavail - 1] = '\0';
 
 		err = uiomove(cookediov->base, cookediov->len, uio);
 		if (err) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804041316.w34DG1EL064946>