udf_readlink: fix malloc call with uninitialized size parameter

Found by:	clang static analyzer
MFC after:	4 days
This commit is contained in:
Andriy Gapon 2010-05-31 09:08:44 +00:00
parent fd63f40f93
commit 6b3ee24839
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=208671

View file

@ -904,9 +904,9 @@ udf_readlink(struct vop_readlink_args *ap)
vp = ap->a_vp;
node = VTON(vp);
len = le64toh(node->fentry->inf_len);
iov[0].iov_len = len;
buf = malloc(iov[0].iov_len, M_DEVBUF, M_WAITOK);
iov[0].iov_base = buf;
iov[0].iov_len = len;
uio.uio_iov = iov;
uio.uio_iovcnt = 1;
uio.uio_offset = 0;