From 7b315234adbe94851b4d37fed1ed2905649dca1d Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 19 Mar 2014 12:55:57 +0000 Subject: MFC r263079: The auio structure is only initialized when the vnode is symlink, avoid reading from it otherwise. --- 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 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); } -- cgit v1.1