]> git.ipfire.org Git - thirdparty/u-boot.git/commit
vfat: Fix mkcksum argument sizes
authorMarek Vasut <marex@denx.de>
Fri, 11 Jan 2013 13:35:48 +0000 (14:35 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 29 Jan 2013 12:28:11 +0000 (13:28 +0100)
commit2ca82b67a09b6d02bb3a0c1189ccd20d35e1ce4c
treebf8a58e3884403c7dea0f30bf259bcd9ed46ba92
parent01ebbdc82fef0f8c2122a69cd3c4900a23b28af4
vfat: Fix mkcksum argument sizes

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.

Reported-by: Aaron Williams <Aaron.Williams@cavium.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tom Rini <tom.rini@gmail.com>
Cc: Aaron Williams <Aaron.Williams@cavium.com>
fs/fat/fat.c