diff -rup libvirt-0.6.2.orig/src/xm_internal.c libvirt-0.6.2.new/src/xm_internal.c --- libvirt-0.6.2.orig/src/xm_internal.c 2009-04-03 15:04:28.000000000 +0100 +++ libvirt-0.6.2.new/src/xm_internal.c 2009-04-23 10:53:10.000000000 +0100 @@ -2912,7 +2912,8 @@ xenXMDomainDetachDevice(virDomainPtr dom if (i < (def->ndisks - 1)) memmove(def->disks + i, def->disks + i + 1, - def->ndisks - (i + 1)); + sizeof(*def->disks) * + (def->ndisks - (i + 1))); break; } } @@ -2929,7 +2930,8 @@ xenXMDomainDetachDevice(virDomainPtr dom if (i < (def->nnets - 1)) memmove(def->nets + i, def->nets + i + 1, - def->nnets - (i + 1)); + sizeof(*def->nets) * + (def->nnets - (i + 1))); break; } }