[U-Boot] [PATCH] vfat: Fix mkcksum argument sizes

Mats Kärrman Mats.Karrman at tritech.se
Tue Jan 29 17:00:36 CET 2013


Marek Vasut <marex <at> denx.de> wrote:
> In case a function argument is known/fixed size array in C, the argument is
> still decoyed as pointer instead ( T f(U n[k]) ~= T fn(U *n) ) and therefore
> calling sizeof on the function argument will result in the size of the pointer,
> not the size of the array.
> 
> The VFAT code contains such a bug, this patch fixes it.
> 

I had the same problem with VFAT formatted USB stick on U-Boot 2013.01 as
the original bug reported by Michail Simek.
I have not made any deeper analysis of your patch, but it solved the problem.

Thanks!
BR / Mats


More information about the U-Boot mailing list