On Thu, Mar 12, 2020 at 02:44:46PM +0000, Richard W.M. Jones wrote:
- r->guestfs_int_xattr_list_val[j].attrname = strdup
(&buf[i]);
- r->guestfs_int_xattr_list_val[j].attrval.attrval_val = malloc (vlen);
- r->guestfs_int_xattr_list_val[j].attrval.attrval_len = vlen;
+ r->guestfs_int_xattr_list_val[i].attrname = strdup (&buf[i]);
I guess our testing doesn't cover this function, because
it would certainly have crashed here. &buf[i] should be names[i].
I have updated my local copy.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html