[U-Boot-Users] memset bug in ext2fs_read_file()

Mike Montour mail at mmontour.net
Thu Dec 20 07:34:25 CET 2007


Hello,

The ext2fs_read_file() function in fs/ext2/ext2fs.c contains the 
following line:

  439                         memset (buf, blocksize - skipfirst, 0);

This is incorrect as the prototype of the function has the fill value as 
the 2nd parameter and the number of bytes as the 3rd:

void *memset(void *b, int c, size_t n);

I don't have any test code that is affected by this bug. I noticed it 
when I was investigating a different problem (with OpenMoko).





More information about the U-Boot mailing list