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

Re: [libvirt] [PATCH 1/3] qemu: only parse basename when determining emulator properties



On 28.08.2013 06:00, Eric Blake wrote:
> 'virsh domxml-from-native' and 'virsh qemu-attach' could misbehave
> for an emulator installed in (a somewhat unlikely) location
> such as /usr/local/qemu-1.6/qemu-system-x86_64 or (an even less
> likely) /opt/notxen/qemu-system-x86_64.  Limit the strstr seach
> to just the basename of the file where we are assuming details
> about the binary based on its name.
> 
> While testing, I accidentally triggered a core dump during strcmp
> when I forgot to set os.type on one of my code paths; this patch
> changes such a coding error to raise a nicer internal error instead.
> 
> * src/qemu/qemu_command.c (qemuParseCommandLine): Compute basename
> earlier.
> * src/conf/domain_conf.c (virDomainDefPostParseInternal): Avoid
> NULL deref.
> 
> Signed-off-by: Eric Blake <eblake redhat com>
> ---
>  src/conf/domain_conf.c  |  6 ++++++
>  src/qemu/qemu_command.c | 22 ++++++++++------------
>  2 files changed, 16 insertions(+), 12 deletions(-)

ACK

Michal


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