[libvirt] [PATCH] usb: Correct test for virUSBDeviceListSteal

2013-07-05 Thread Gonglei (Arei)
In the for loop, the if condition is always true, and will execute memmove. But it will cause the list-devs[i+1] overflow while i equals list-count-1. Signed-off-by: Gonglei arei.gong...@huawei.com --- src/util/virusb.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] usb: Correct test for virUSBDeviceListSteal

2013-07-05 Thread Laine Stump
On 07/05/2013 02:23 AM, Gonglei (Arei) wrote: In the for loop, the if condition is always true, and will execute memmove. But it will cause the list-devs[i+1] overflow while i equals list-count-1. Signed-off-by: Gonglei arei.gong...@huawei.com --- src/util/virusb.c |2 +- 1 files

Re: [libvirt] [PATCH] usb: Correct test for virUSBDeviceListSteal

2013-07-05 Thread Laine Stump
On 07/05/2013 11:37 AM, Laine Stump wrote: On 07/05/2013 02:23 AM, Gonglei (Arei) wrote: In the for loop, the if condition is always true, and will execute memmove. But it will cause the list-devs[i+1] overflow while i equals list-count-1. BTW, does that actually cause a failure? Although

Re: [libvirt] [PATCH] usb: Correct test for virUSBDeviceListSteal

2013-07-05 Thread Laine Stump
On 07/05/2013 11:37 AM, Laine Stump wrote: On 07/05/2013 02:23 AM, Gonglei (Arei) wrote: In the for loop, the if condition is always true, and will execute memmove. But it will cause the list-devs[i+1] overflow while i equals list-count-1. Signed-off-by: Gonglei arei.gong...@huawei.com ---