diff options
author | kib <kib@FreeBSD.org> | 2014-03-12 10:23:51 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-03-12 10:23:51 +0000 |
commit | f7d0f51921f04d2856780f9f7f629caffd26b9ea (patch) | |
tree | 7fd6b3d3cb35d70740eecd212ca6faac07f80dd0 | |
parent | dc881bd3d93c18c83c1c7b53fb172c0d334078c8 (diff) | |
download | FreeBSD-src-f7d0f51921f04d2856780f9f7f629caffd26b9ea.zip FreeBSD-src-f7d0f51921f04d2856780f9f7f629caffd26b9ea.tar.gz |
The auio structure is only initialized when the vnode is symlink,
avoid reading from it otherwise.
Submitted by: Conrad Meyer <cemeyer@uw.edu>
MFC after: 1 week
-rw-r--r-- | sys/kern/vfs_syscalls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 4be9738..f680d43 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2553,9 +2553,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); } |