Re: [PATCH 1/2] qemu: convert the flags type to unsigned long

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

 



On Sat, Nov 19, 2022 at 17:31:27 +0800, Jiang Jiacheng wrote:
> The flags type is unsigend long but passed as unsigend int
> when invoke 'qemuMigrationSrcNBDStorageCopy'. Modify it to
> prevent data truncation.
> 
> Signed-off-by: Jiang Jiacheng <jiangjiacheng@xxxxxxxxxx>
> ---
>  src/qemu/qemu_migration.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Actually the use of 'unsigned long flags' in the migration APIs is a
historical mistake. While we can't remove that type from the function
prototype, internally the code MUST use 32 bit at most as 'unsigned
long' is not portable between 32 and 64 bit hosts.




[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