Initialize uio_iovcnt to 1 in extattr_list_vp() and extattr_get_vp()

PR:		kern/79357
Approved by:	rwatson
This commit is contained in:
rodrigc 2005-06-08 13:22:10 +00:00
parent 89e23148a0
commit b2d9df7a8b
2 changed files with 4 additions and 0 deletions

View File

@ -4545,6 +4545,7 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
aiov.iov_base = data;
aiov.iov_len = nbytes;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_offset = 0;
if (nbytes > INT_MAX) {
error = EINVAL;
@ -4831,6 +4832,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
aiov.iov_base = data;
aiov.iov_len = nbytes;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_offset = 0;
if (nbytes > INT_MAX) {
error = EINVAL;

View File

@ -4545,6 +4545,7 @@ extattr_get_vp(struct vnode *vp, int attrnamespace, const char *attrname,
aiov.iov_base = data;
aiov.iov_len = nbytes;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_offset = 0;
if (nbytes > INT_MAX) {
error = EINVAL;
@ -4831,6 +4832,7 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data,
aiov.iov_base = data;
aiov.iov_len = nbytes;
auio.uio_iov = &aiov;
auio.uio_iovcnt = 1;
auio.uio_offset = 0;
if (nbytes > INT_MAX) {
error = EINVAL;