summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2014-03-19 12:55:57 +0000
committerkib <kib@FreeBSD.org>2014-03-19 12:55:57 +0000
commit7b315234adbe94851b4d37fed1ed2905649dca1d (patch)
tree497a53d1362ea4936c5b38b14350aab253947b2c /sys
parent78bde6490528c198cd485385ecb997b6031f1bdb (diff)
downloadFreeBSD-src-7b315234adbe94851b4d37fed1ed2905649dca1d.zip
FreeBSD-src-7b315234adbe94851b4d37fed1ed2905649dca1d.tar.gz
MFC r263079:
The auio structure is only initialized when the vnode is symlink, avoid reading from it otherwise.
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_syscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index fd27243..26b00af 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -2554,9 +2554,9 @@ kern_readlinkat(struct thread *td, int fd, char *path, enum uio_seg pathseg,
auio.uio_td = td;
auio.uio_resid = count;
error = VOP_READLINK(vp, &auio, td->td_ucred);
+ td->td_retval[0] = count - auio.uio_resid;
}
vput(vp);
- td->td_retval[0] = count - auio.uio_resid;
return (error);
}
OpenPOWER on IntegriCloud