Re: [PATCH] Avoid integer wrap on remotePortMax in QEMU driver

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

 



On 01/17/13 13:09, Daniel P. Berrange wrote:
> @@ -103,7 +103,7 @@ int virPortAllocatorAcquire(virPortAllocatorPtr pa,
>      *port = 0;
>      virObjectLock(pa);
>  
> -    for (i = pa->start ; i < pa->end && !*port; i++) {
> +    for (i = pa->start ; i <= pa->end && !*port; i++) {
>          int reuse = 1;
>          struct sockaddr_in addr;
>          bool used = false;

The same condition needs to be changed in virPortAllocatorRelease.
(And this breaks the virportallocatortest)

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