ubinize corrections

Artem Bityutskiy dedekind at infradead.org
Thu Nov 6 02:13:43 EST 2008


On Mon, 2008-11-03 at 10:41 +0200, Adrian Hunter wrote:
> J. Scott Merritt wrote:
> > Dear list,
> > 
> > I believe that I have stumbled upon two problems with the latest version
> > of ubinize.c in mtd-utils - one serious, and one not so serious.
> > 
> > - First, the easy one: At line 457, I believe that we should be printing
> > args.subpage_size rather than ui.min_io_size.
> > 
> > - More seriously, I believe that the "flags" field in the ubigen_vol_info
> > structures is not being properly initialized.  Line 494 allocates memory
> > for these structures with malloc, so they are not cleared to zero.  The
> > read_section function updates the flag field if the AUTO-RESIZE flag is
> > specified, but does not otherwise initialize or clear it.
> > 
> > I reckon the latter problem could be repaired either with calloc, or by
> > modifying read_section to more directly set/clear the flag.
> > 
> > Thanks, Scott.
> 
> I agree.  Here's the patch:

Pushed, thanks for the report and the patch.

-- 
Best regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list