Re: [PATCHv2] util: fix off-by-one when expanding a bitmap

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

 



On 02/14/2017 01:46 PM, Ján Tomko wrote:
> To make sure bit 'b' fits into the bitmap, we need to allocate b+1
> bits, since we number from 0.
> 
> Adjust the bitmap test to set a bit at a multiple of 16.
> That way the test fails without this fix, because the VIR_REALLOC
> call clears the newly added memory even if the original pointer
> has not changed.
> ---
>  src/util/virbitmap.c  | 2 +-
>  tests/virbitmaptest.c | 6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)

ACK

Michal

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