
13 Dec
2008
13 Dec
'08
11:22 p.m.
On 23:13 Sat 13 Dec , Wolfgang Denk wrote:
Hello,
building U-Boot with recent toolchains (like GCC-4.3.2) results in this warning:
fat.c: In function 'read_bootsectandvi': fat.c:707: warning: array subscript is above array bounds
The respective code looks like this:
fs/fat/fat.c:
705 /* Terminate fs_type string. Writing past the end of vistart 706 is ok - it's just the buffer. */ 707 vistart->fs_type[8] = '\0';
why not do something like this
*(vistart + sizeof(volume_info)) = '\0';
Best Regards, J.