Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Apr 2018 13:15:12 +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-11@freebsd.org
Subject:   svn commit: r332022 - stable/11/sys/fs/fuse
Message-ID:  <201804041315.w34DFCAR064310@repo.freebsd.org>

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

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/11/sys/fs/fuse/fuse_internal.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/fs/fuse/fuse_internal.c
==============================================================================
--- stable/11/sys/fs/fuse/fuse_internal.c	Wed Apr  4 13:12:49 2018	(r332021)
+++ stable/11/sys/fs/fuse/fuse_internal.c	Wed Apr  4 13:15:12 2018	(r332022)
@@ -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?201804041315.w34DFCAR064310>