unsigned/signed type mismatch in init_bg overrun variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

This was initially reported to the Android project at
http://code.google.com/p/android/issues/detail?id=58674 by someone
else.

284 u32 overrun = bg->first_block + info.blocks_per_group - aux_info.len_blocks;
285 if (overrun > 0)
286     reserve_blocks(bg, info.blocks_per_group - overrun, overrun);

Here, |reserve_blocks| is always called unless |bg->first_block +
info.blocks_per_group == aux_info.len_blocks| as overrun is unsigned
and the expression is signed.

The suggestion in the Android bug report was to change |overrun| to |s64|.

Thanks,
- Reece
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux