From f7d0f51921f04d2856780f9f7f629caffd26b9ea Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 12 Mar 2014 10:23:51 +0000 Subject: The auio structure is only initialized when the vnode is symlink, avoid reading from it otherwise. Submitted by: Conrad Meyer MFC after: 1 week --- sys/kern/vfs_syscalls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.1