Re: [PATCH v2] test_driver: implement virDomainGetDiskErrors

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

 



On Wed, May 15, 2019 at 10:14:35 +0200, Michal Privoznik wrote:
> On 5/14/19 5:24 PM, Ilias Stamatis wrote:
> > On Tue, May 14, 2019 at 5:04 PM Michal Privoznik <mprivozn@xxxxxxxxxx> wrote:

[...]

> > Because in the first loop, VIR_STRDUP might fail and send us to
> > "cleanup". But then on cleanup we iterate over the whole errors array.
> > 
> > Isn't this incorrect? Do I understand something wrong?
> 
> 
> Ah, now I get it. If user passes an array that is not zeroed out then we
> might end up passing a random pointer to free(). How about this then?

Why don't you just sanitize the user-passed memory first then?

Attachment: signature.asc
Description: PGP signature

--
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]

  Powered by Linux