[U-Boot] [PATCH] UBIFS: Change ubifsload to not read beyond the requested size
Stefan Roese
sr at denx.de
Mon Nov 1 16:47:43 CET 2010
Hi Ben,
On Friday 29 October 2010 16:01:18 Ben Gardiner wrote:
> On Fri, Oct 29, 2010 at 5:04 AM, Stefan Roese <sr at denx.de> wrote:
> > Until now ubifsload pads the destination with 0 up to a multiple of
> > UBIFS_BLOCK_SIZE (4KiB) while reading a file to memory. This patch
> > changes this behaviour to only read to the requested length. This
> > is either the file length or the length/size provided as parameter
> > to the ubifsload command.
> >
> > Signed-off-by: Stefan Roese <sr at denx.de>
> > ---
> > [...]
> > + /*
> > + * Reading last block? Make sure to not write
> > beyond + * the requested size.
> > + */
>
> s/write/read/
No. This refers to not writing beyond the requested size in the destination
buffer. So that nothing will be overwritten by this 4KiB padding. I'll change
this comment a bit to make this clearer in the next patch version.
> > [...]
> > + /* Read block-siez into temp buffer */
>
> s/siez/size/
Thanks for catching. Will change.
Cheers,
Stefan
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de
More information about the U-Boot
mailing list