sys/fuse: fix off by one error
Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com> Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com>
This commit is contained in:
parent
ccae7bb851
commit
40301da899
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330354
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user