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

Re: [Xen-devel] [PATCH 18/23] libxc: Add range checking to xc_dom_binloader



On 14/06/13 16:14, Ian Jackson wrote:
George Dunlap writes ("Re: [Xen-devel] [PATCH 18/23] libxc: Add range checking to 
xc_dom_binloader"):
if ( dom->kernel-size - sizeof(*table) > 8192)
   ptr_end = dom->kernel_blob + 8192
else
   ptr_end = dom->kernel_size - sizeof(*table);

Or something along those lines?
Yes, I said something similar to Chuck.  Except that your code has a
bug if kernel_size < sizeof(*table) :-).

...no, because that's already checked by the previous hunk of your patch. :-)

TBH I think I'd rather not disturb this any more than necessary.

I think disturbing it in a way that is obviously correct is better than disturbing it in a way that looks redundant.

But I do think that the code in the patch you have, while unnecessarily confusing and likely to trip someone up down the road, will do what the patch claims it will do.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.