Re: [Qemu-devel] [PATCH 1/4] load_image_targphys() should enforce the max size

2012-01-11 Thread David Gibson
On Wed, Jan 11, 2012 at 07:19:00AM +0100, Stefan Weil wrote: > Am 11.01.2012 06:44, schrieb David Gibson: > >From: Benjamin Herrenschmidt > > > >load_image_targphys() gets passed a max size for the file, but > >doesn't enforce it at all. Add a check and return -1 (error) if > >the file is too big,

Re: [Qemu-devel] [PATCH 1/4] load_image_targphys() should enforce the max size

2012-01-10 Thread Stefan Weil
Am 11.01.2012 06:44, schrieb David Gibson: From: Benjamin Herrenschmidt load_image_targphys() gets passed a max size for the file, but doesn't enforce it at all. Add a check and return -1 (error) if the file is too big, without loading it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by:

[Qemu-devel] [PATCH 1/4] load_image_targphys() should enforce the max size

2012-01-10 Thread David Gibson
From: Benjamin Herrenschmidt load_image_targphys() gets passed a max size for the file, but doesn't enforce it at all. Add a check and return -1 (error) if the file is too big, without loading it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- hw/loader.c |2 ++ 1 f