Date: Sat, 3 Mar 2018 20:42:39 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330354 - head/sys/fs/fuse Message-ID: <201803032042.w23Kgdqp042385@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Sat Mar 3 20:42:39 2018 New Revision: 330354 URL: https://svnweb.freebsd.org/changeset/base/330354 Log: sys/fuse: fix off by one error Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com> Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com> Modified: head/sys/fs/fuse/fuse_internal.c Modified: head/sys/fs/fuse/fuse_internal.c ============================================================================== --- head/sys/fs/fuse/fuse_internal.c Sat Mar 3 19:26:40 2018 (r330353) +++ head/sys/fs/fuse/fuse_internal.c Sat Mar 3 20:42:39 2018 (r330354) @@ -357,7 +357,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?201803032042.w23Kgdqp042385>