[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH] Robustify sexpr parser for NICs
- From: Jim Meyering <jim meyering net>
- To: john levon sun com
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH] Robustify sexpr parser for NICs
- Date: Thu, 05 Feb 2009 06:56:58 +0100
john levon sun com wrote:
> Robustify sexpr parser for NICs
>
> xend can occassionally get itself confused. Avoid crashing libvirt in
> this case.
>
> diff --git a/src/xend_internal.c b/src/xend_internal.c
> --- a/src/xend_internal.c
> +++ b/src/xend_internal.c
> @@ -1759,7 +1759,8 @@ xenDaemonParseSxprNets(virConnectPtr con
> if (VIR_ALLOC(net) < 0)
> goto no_memory;
>
> - if (tmp != NULL || (STREQ(tmp2, DEFAULT_VIF_SCRIPT))) {
> + if (tmp != NULL ||
> + (tmp2 != NULL && STREQ(tmp2, DEFAULT_VIF_SCRIPT))) {
> net->type = VIR_DOMAIN_NET_TYPE_BRIDGE;
> /* XXX virtual network reverse resolve */
ACK, but it'd sure be nice to post
an example of input that would crash libvirt.
Bonus points for making it into a test case.
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]