udf_readlink: fix malloc call with uninitialized size parameter
Found by: clang static analyzer MFC after: 4 days
This commit is contained in:
parent
fd63f40f93
commit
6b3ee24839
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user