On Thu, Jul 15, 2004 at 02:24:54PM +1200, Clive Nicolson wrote:
> In read_inode of blob/jffs2.c the following for loop appears
>
> for (page = 0; page <= size / 4096; page++) {
> /* Print a '.' every 0x40000 bytes */
>
> Should "size / 4096" not be "(size-1) / 4096" ?
I haven't looked at the file, but if it is indeed a bug, the cleaner
fix is to replace <= by <.
But I think we want size/4096, think about what happens when size = 0
or size = 1.
(again, I haven't looked at the file cause I don't have the source
available right here and my internet link is a bit flakey, so I'm just
guessing).
Erik
--
---- Erik Mouw ---- www.bitwizard.nl ---- +31 15 2600 998 ----
|