[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/hvm: fix hypervisor crash with hvm_save_one()
>>> On 02.05.17 at 16:13, <rcojocaru@xxxxxxxxxxxxxxx> wrote: > So you would prefer something like this? Not exactly: > --- a/xen/common/hvm/save.c > +++ b/xen/common/hvm/save.c > @@ -113,6 +113,10 @@ int hvm_save_one(struct domain *d, uint16_t > typecode, uint16_t instance, > const struct hvm_save_descriptor *desc; > > rv = -ENOENT; > + > + if ( !ctxt.cur ) if ( ctxt.cur < sizeof(*desc) ) > + goto out; > + > for ( off = 0; off < (ctxt.cur - sizeof(*desc)); off += > desc->length ) > { > desc = (void *)(ctxt.data + off); > @@ -132,6 +136,7 @@ int hvm_save_one(struct domain *d, uint16_t > typecode, uint16_t instance, > } > } > > +out: And this properly indented. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |