1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-31 16:57:10 +00:00

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
This commit is contained in:
Konstantin Belousov 2014-03-12 10:23:51 +00:00
parent b0cba3367e
commit 9d2437a6f5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=263079

View File

@ -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);
}