Re: [libvirt] PATCH: Fix mem corruption after detaching Xen device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 23, 2009 at 02:48:49PM +0100, Daniel P. Berrange wrote:
> The XM driver's implementation of the 'detach device' command is causing
> memory corruption, but passing the wrong size information to memmove()
> by passing number of elements to move, instead of amount of memory to
> move. This patch fixes it

  ACK, serious bug, let's push it before 0.6.3

In general I would have felt safer if we could have used macros like for
memory allocation and freeing when growing and shrinking arrays,
especially when we switched from lists to arrays we added an awful lot
of similar code and using the size of the pointed object in macros
could have avoided this kind of problems I guess. If it can be used
to get malloc'ed size it should be able to work for realloc too I guess.
Maybe something to look at for next release, time permitting.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]