[libvirt] [PATCH 01/13] qemu: fix use-after-free when parsing NBD disk
Paolo Bonzini
pbonzini at redhat.com
Thu Feb 28 09:16:25 UTC 2013
Il 28/02/2013 06:03, Eric Blake ha scritto:
> diff --git i/src/qemu/qemu_command.c w/src/qemu/qemu_command.c
> index 0a7d4ec..f8f3ade 100644
> --- i/src/qemu/qemu_command.c
> +++ w/src/qemu/qemu_command.c
> @@ -8832,11 +8832,11 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr
> qemuCaps,
> if (VIR_ALLOC(disk->hosts) < 0)
> goto no_memory;
> disk->nhosts = 1;
> - disk->hosts->name = host;
> + disk->hosts->name = disk->src;
> + disk->src = NULL;
> disk->hosts->port = strdup(port);
> if (!disk->hosts->port)
> goto no_memory;
> - disk->src = NULL;
> break;
> case VIR_DOMAIN_DISK_PROTOCOL_RBD:
> /* old-style CEPH_ARGS env variable is parsed later */
>
>
ACK
Paolo
More information about the libvir-list
mailing list