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(a)huawei.com>
---
src/qemu/qemu_migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index bba4e1dbf3..ba6c933885 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1077,7 +1077,7 @@ qemuMigrationSrcNBDStorageCopyOne(virDomainObj *vm,
bool mirror_shallow,
const char *tlsAlias,
const char *tlsHostname,
- unsigned int flags)
+ unsigned long flags)
{
qemuDomainDiskPrivate *diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
qemuBlockJobData *job = NULL;
@@ -1142,7 +1142,7 @@ qemuMigrationSrcNBDStorageCopy(virQEMUDriver *driver,
const char *tlsAlias,
const char *tlsHostname,
const char *nbdURI,
- unsigned int flags)
+ unsigned long flags)
{
qemuDomainObjPrivate *priv = vm->privateData;
int port;
--
2.33.0